Class: Vigor::StatsSet
- Inherits:
-
Object
- Object
- Vigor::StatsSet
- Defined in:
- lib/vigor/stats.rb
Instance Attribute Summary collapse
-
#losses ⇒ Object
Returns the value of attribute losses.
-
#modify_date ⇒ Object
Returns the value of attribute modify_date.
-
#stats ⇒ Object
Returns the value of attribute stats.
-
#type ⇒ Object
Returns the value of attribute type.
-
#wins ⇒ Object
Returns the value of attribute wins.
Instance Method Summary collapse
-
#initialize(data) ⇒ StatsSet
constructor
A new instance of StatsSet.
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
#losses ⇒ Object
Returns the value of attribute losses.
27 28 29 |
# File 'lib/vigor/stats.rb', line 27 def losses @losses end |
#modify_date ⇒ Object
Returns the value of attribute modify_date.
27 28 29 |
# File 'lib/vigor/stats.rb', line 27 def modify_date @modify_date end |
#stats ⇒ Object
Returns the value of attribute stats.
27 28 29 |
# File 'lib/vigor/stats.rb', line 27 def stats @stats end |
#type ⇒ Object
Returns the value of attribute type.
27 28 29 |
# File 'lib/vigor/stats.rb', line 27 def type @type end |
#wins ⇒ Object
Returns the value of attribute wins.
27 28 29 |
# File 'lib/vigor/stats.rb', line 27 def wins @wins end |