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.



134
135
136
137
138
139
140
# File 'lib/postproxy/types.rb', line 134

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.



132
133
134
# File 'lib/postproxy/types.rb', line 132

def platform
  @platform
end

#profile_idObject

Returns the value of attribute profile_id.



132
133
134
# File 'lib/postproxy/types.rb', line 132

def profile_id
  @profile_id
end

#recordsObject

Returns the value of attribute records.



132
133
134
# File 'lib/postproxy/types.rb', line 132

def records
  @records
end