Class: Player
- Inherits:
-
Object
- Object
- Player
- Defined in:
- lib/player.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(name, token = "X") ⇒ Player
constructor
A new instance of Player.
Constructor Details
#initialize(name, token = "X") ⇒ Player
Returns a new instance of Player.
5 6 7 8 |
# File 'lib/player.rb', line 5 def initialize(name, token = "X") @name = name @token = token end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/player.rb', line 2 def name @name end |
#token ⇒ Object
Returns the value of attribute token.
3 4 5 |
# File 'lib/player.rb', line 3 def token @token end |