Class: Codebreaker::User
Constant Summary collapse
- USERNAME_LENGTH_RANGE =
(3..20).freeze
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(username_new) ⇒ User
constructor
A new instance of User.
Methods inherited from BaseClass
Methods included from Validator
#validate_length?, #validate_number_range?
Constructor Details
#initialize(username_new) ⇒ User
Returns a new instance of User.
7 8 9 10 |
# File 'lib/codebreaker/user.rb', line 7 def initialize(username_new) @username = username_new @errors = {} end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
5 6 7 |
# File 'lib/codebreaker/user.rb', line 5 def errors @errors end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
5 6 7 |
# File 'lib/codebreaker/user.rb', line 5 def username @username end |