Class: Wot::Player::Tank
- Inherits:
-
Object
- Object
- Wot::Player::Tank
- Defined in:
- lib/wot/player/tank.rb
Instance Attribute Summary collapse
-
#battles ⇒ Object
Returns the value of attribute battles.
-
#data ⇒ Object
Returns the value of attribute data.
-
#id ⇒ Object
Returns the value of attribute id.
-
#mark_of_mastery ⇒ Object
Returns the value of attribute mark_of_mastery.
-
#wins ⇒ Object
Returns the value of attribute wins.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ Tank
constructor
A new instance of Tank.
Constructor Details
#initialize(data) ⇒ Tank
Returns a new instance of Tank.
17 18 19 20 21 22 23 |
# File 'lib/wot/player/tank.rb', line 17 def initialize(data) @data = data @id = @data[:tank_id] @mark_of_mastery = @data[:mark_of_mastery] @battles = @data[:statistics][:battles] @wins = @data[:statistics][:wins] end |
Instance Attribute Details
#battles ⇒ Object
Returns the value of attribute battles.
6 7 8 |
# File 'lib/wot/player/tank.rb', line 6 def battles @battles end |
#data ⇒ Object
Returns the value of attribute data.
6 7 8 |
# File 'lib/wot/player/tank.rb', line 6 def data @data end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/wot/player/tank.rb', line 6 def id @id end |
#mark_of_mastery ⇒ Object
Returns the value of attribute mark_of_mastery.
6 7 8 |
# File 'lib/wot/player/tank.rb', line 6 def mark_of_mastery @mark_of_mastery end |
#wins ⇒ Object
Returns the value of attribute wins.
6 7 8 |
# File 'lib/wot/player/tank.rb', line 6 def wins @wins end |