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.



262
263
264
265
266
267
268
# File 'lib/postproxy/types.rb', line 262

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.



260
261
262
# File 'lib/postproxy/types.rb', line 260

def platform
  @platform
end

#profile_idObject

Returns the value of attribute profile_id.



260
261
262
# File 'lib/postproxy/types.rb', line 260

def profile_id
  @profile_id
end

#recordsObject

Returns the value of attribute records.



260
261
262
# File 'lib/postproxy/types.rb', line 260

def records
  @records
end