Class: PostProxy::PostStats
Instance Attribute Summary collapse
-
#platforms ⇒ Object
Returns the value of attribute platforms.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ PostStats
constructor
A new instance of PostStats.
Methods inherited from Model
Constructor Details
#initialize(**attrs) ⇒ PostStats
Returns a new instance of PostStats.
243 244 245 246 247 248 249 |
# File 'lib/postproxy/types.rb', line 243 def initialize(**attrs) @platforms = [] super @platforms = (@platforms || []).map do |p| p.is_a?(PlatformStats) ? p : PlatformStats.new(**p.transform_keys(&:to_sym)) end end |
Instance Attribute Details
#platforms ⇒ Object
Returns the value of attribute platforms.
241 242 243 |
# File 'lib/postproxy/types.rb', line 241 def platforms @platforms end |