Class: Wot::Player::Statistics
- Inherits:
-
Object
- Object
- Wot::Player::Statistics
- Defined in:
- lib/wot/player/statistics.rb
Instance Attribute Summary collapse
-
#all ⇒ Object
Returns the value of attribute all.
-
#clan ⇒ Object
Returns the value of attribute clan.
-
#company ⇒ Object
Returns the value of attribute company.
-
#data ⇒ Object
Returns the value of attribute data.
-
#historical ⇒ Object
Returns the value of attribute historical.
-
#max_damage ⇒ Object
Returns the value of attribute max_damage.
-
#max_xp ⇒ Object
Returns the value of attribute max_xp.
Instance Method Summary collapse
-
#initialize(data) ⇒ Statistics
constructor
A new instance of Statistics.
Constructor Details
#initialize(data) ⇒ Statistics
Returns a new instance of Statistics.
7 8 9 10 11 12 13 14 15 |
# File 'lib/wot/player/statistics.rb', line 7 def initialize(data) @data = data @max_damage = data[:max_damage] @max_xp = data[:max_xp] @all = Wot::Player::ExtendedStatistics.new(@data[:all]) @clan = Wot::Player::ExtendedStatistics.new(@data[:clan]) @company = Wot::Player::ExtendedStatistics.new(@data[:company]) @historical = Wot::Player::ExtendedStatistics.new(@data[:historical]) end |
Instance Attribute Details
#all ⇒ Object
Returns the value of attribute all.
5 6 7 |
# File 'lib/wot/player/statistics.rb', line 5 def all @all end |
#clan ⇒ Object
Returns the value of attribute clan.
5 6 7 |
# File 'lib/wot/player/statistics.rb', line 5 def clan @clan end |
#company ⇒ Object
Returns the value of attribute company.
5 6 7 |
# File 'lib/wot/player/statistics.rb', line 5 def company @company end |
#data ⇒ Object
Returns the value of attribute data.
5 6 7 |
# File 'lib/wot/player/statistics.rb', line 5 def data @data end |
#historical ⇒ Object
Returns the value of attribute historical.
5 6 7 |
# File 'lib/wot/player/statistics.rb', line 5 def historical @historical end |
#max_damage ⇒ Object
Returns the value of attribute max_damage.
5 6 7 |
# File 'lib/wot/player/statistics.rb', line 5 def max_damage @max_damage end |
#max_xp ⇒ Object
Returns the value of attribute max_xp.
5 6 7 |
# File 'lib/wot/player/statistics.rb', line 5 def max_xp @max_xp end |