Class: User
- Inherits:
-
Object
- Object
- User
- Defined in:
- lib/modules/user.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#used_attempts ⇒ Object
Returns the value of attribute used_attempts.
-
#used_hints ⇒ Object
Returns the value of attribute used_hints.
Instance Method Summary collapse
-
#initialize(name) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(name) ⇒ User
Returns a new instance of User.
5 6 7 8 9 10 11 |
# File 'lib/modules/user.rb', line 5 def initialize(name) return unless valid?(name) @name = name @used_attempts = 0 @used_hints = 0 end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/modules/user.rb', line 3 def name @name end |
#used_attempts ⇒ Object
Returns the value of attribute used_attempts.
2 3 4 |
# File 'lib/modules/user.rb', line 2 def used_attempts @used_attempts end |
#used_hints ⇒ Object
Returns the value of attribute used_hints.
2 3 4 |
# File 'lib/modules/user.rb', line 2 def used_hints @used_hints end |