Class: PostProxy::PlatformStats
Instance Attribute Summary collapse
-
#platform ⇒ Object
Returns the value of attribute platform.
-
#profile_id ⇒ Object
Returns the value of attribute profile_id.
-
#records ⇒ Object
Returns the value of attribute records.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ PlatformStats
constructor
A new instance of PlatformStats.
Methods inherited from Model
Constructor Details
#initialize(**attrs) ⇒ PlatformStats
Returns a new instance of PlatformStats.
231 232 233 234 235 236 237 |
# File 'lib/postproxy/types.rb', line 231 def initialize(**attrs) @records = [] super @records = (@records || []).map do |r| r.is_a?(StatsRecord) ? r : StatsRecord.new(**r.transform_keys(&:to_sym)) end end |
Instance Attribute Details
#platform ⇒ Object
Returns the value of attribute platform.
229 230 231 |
# File 'lib/postproxy/types.rb', line 229 def platform @platform end |
#profile_id ⇒ Object
Returns the value of attribute profile_id.
229 230 231 |
# File 'lib/postproxy/types.rb', line 229 def profile_id @profile_id end |
#records ⇒ Object
Returns the value of attribute records.
229 230 231 |
# File 'lib/postproxy/types.rb', line 229 def records @records end |