Class: PostProxy::ProfileStats

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) ⇒ ProfileStats

Returns a new instance of ProfileStats.



546
547
548
549
550
551
552
553
# File 'lib/postproxy/types.rb', line 546

def initialize(**attrs)
  @placement_id = nil
  @records = []
  super
  @records = (@records || []).map do |r|
    r.is_a?(StatsRecord) ? r : StatsRecord.new(**r.transform_keys(&:to_sym))
  end
end

Instance Attribute Details

#placement_idObject

Returns the value of attribute placement_id.



544
545
546
# File 'lib/postproxy/types.rb', line 544

def placement_id
  @placement_id
end

#platformObject

Returns the value of attribute platform.



544
545
546
# File 'lib/postproxy/types.rb', line 544

def platform
  @platform
end

#profile_idObject

Returns the value of attribute profile_id.



544
545
546
# File 'lib/postproxy/types.rb', line 544

def profile_id
  @profile_id
end

#recordsObject

Returns the value of attribute records.



544
545
546
# File 'lib/postproxy/types.rb', line 544

def records
  @records
end