Class: Codebreaker::Player
- Inherits:
-
Object
- Object
- Codebreaker::Player
- Includes:
- Mixins::Validator
- Defined in:
- lib/codebreaker/player.rb
Constant Summary collapse
- NAME_SIZE =
{ min: 3, max: 20 }.freeze
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Player
constructor
A new instance of Player.
- #validate ⇒ Object
Methods included from Mixins::Validator
Constructor Details
#initialize(name) ⇒ Player
Returns a new instance of Player.
12 13 14 |
# File 'lib/codebreaker/player.rb', line 12 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/codebreaker/player.rb', line 10 def name @name end |