Class: Hearthstone::Log::GamePlayer
- Inherits:
-
Object
- Object
- Hearthstone::Log::GamePlayer
- Defined in:
- lib/hearthstone/log/data/game_player.rb
Instance Attribute Summary collapse
-
#first_player ⇒ Object
Returns the value of attribute first_player.
-
#hero ⇒ Object
Returns the value of attribute hero.
-
#hero_power ⇒ Object
Returns the value of attribute hero_power.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(id: nil, name: nil) ⇒ GamePlayer
constructor
A new instance of GamePlayer.
- #to_hash ⇒ Object
Constructor Details
#initialize(id: nil, name: nil) ⇒ GamePlayer
Returns a new instance of GamePlayer.
7 8 9 10 11 |
# File 'lib/hearthstone/log/data/game_player.rb', line 7 def initialize(id: nil, name: nil) @name = name @id = id @first_player = false end |
Instance Attribute Details
#first_player ⇒ Object
Returns the value of attribute first_player.
4 5 6 |
# File 'lib/hearthstone/log/data/game_player.rb', line 4 def first_player @first_player end |
#hero ⇒ Object
Returns the value of attribute hero.
5 6 7 |
# File 'lib/hearthstone/log/data/game_player.rb', line 5 def hero @hero end |
#hero_power ⇒ Object
Returns the value of attribute hero_power.
5 6 7 |
# File 'lib/hearthstone/log/data/game_player.rb', line 5 def hero_power @hero_power end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/hearthstone/log/data/game_player.rb', line 4 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/hearthstone/log/data/game_player.rb', line 4 def name @name end |
Instance Method Details
#to_hash ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/hearthstone/log/data/game_player.rb', line 13 def to_hash { id: id, name: name, first_player: first_player, hero: hero, hero_power: hero_power } end |