Class: PostProxy::PlatformStats

Inherits:
Model
  • Object
show all
Defined in:
lib/postproxy/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#to_h

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

#platformObject

Returns the value of attribute platform.



229
230
231
# File 'lib/postproxy/types.rb', line 229

def platform
  @platform
end

#profile_idObject

Returns the value of attribute profile_id.



229
230
231
# File 'lib/postproxy/types.rb', line 229

def profile_id
  @profile_id
end

#recordsObject

Returns the value of attribute records.



229
230
231
# File 'lib/postproxy/types.rb', line 229

def records
  @records
end