Class: Codebreaker::Player
- Inherits:
-
Object
- Object
- Codebreaker::Player
- Includes:
- Validation
- Defined in:
- lib/codebreaker/player.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Methods included from Validation
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
6 7 8 |
# File 'lib/codebreaker/player.rb', line 6 def errors @errors end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/codebreaker/player.rb', line 7 def name @name end |
Instance Method Details
#valid? ⇒ Boolean
9 10 11 12 |
# File 'lib/codebreaker/player.rb', line 9 def valid? validate errors.empty? end |