Class: Vigor::StatsSet

Inherits:
Object
  • Object
show all
Defined in:
lib/vigor/stats.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ StatsSet

Returns a new instance of StatsSet.



29
30
31
32
33
34
35
# File 'lib/vigor/stats.rb', line 29

def initialize(data)
  @losses = data['losses']
  @modify_date = DateTime.strptime((data['modifyDate']/1000).to_s, '%s')
  @wins = data['wins']
  @stats = data['aggregatedStats']
  @type = data['playerStatSummaryType']
end

Instance Attribute Details

#lossesObject

Returns the value of attribute losses.



27
28
29
# File 'lib/vigor/stats.rb', line 27

def losses
  @losses
end

#modify_dateObject

Returns the value of attribute modify_date.



27
28
29
# File 'lib/vigor/stats.rb', line 27

def modify_date
  @modify_date
end

#statsObject

Returns the value of attribute stats.



27
28
29
# File 'lib/vigor/stats.rb', line 27

def stats
  @stats
end

#typeObject

Returns the value of attribute type.



27
28
29
# File 'lib/vigor/stats.rb', line 27

def type
  @type
end

#winsObject

Returns the value of attribute wins.



27
28
29
# File 'lib/vigor/stats.rb', line 27

def wins
  @wins
end