Class: Codebreaker::User
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from BaseClass
Instance Method Summary collapse
-
#initialize(player_name) ⇒ User
constructor
A new instance of User.
Methods inherited from BaseClass
#clear_errors, #handle_errors, #show_errors
Methods included from Validator
Constructor Details
#initialize(player_name) ⇒ User
7 8 9 10 11 |
# File 'lib/codebreaker/user.rb', line 7 def initialize(player_name) super() validation_name(player_name) @name = player_name if valid? end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/codebreaker/user.rb', line 5 def name @name end |