Class: CodeBrkrGameTraining::User
- Inherits:
-
Object
- Object
- CodeBrkrGameTraining::User
- Includes:
- Validator
- Defined in:
- lib/code_brkr_game_training/entities/user.rb
Overview
Class for game user
Constant Summary collapse
- USERNAME_CONSTRAINTS =
{ min: 3, max: 20 }.freeze
Constants included from Validator
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ User
constructor
A new instance of User.
Methods included from Validator
#check_contain_hash_key, #check_length, #check_type
Constructor Details
#initialize(name) ⇒ User
Returns a new instance of User.
13 14 15 16 |
# File 'lib/code_brkr_game_training/entities/user.rb', line 13 def initialize(name) @name = name validate end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/code_brkr_game_training/entities/user.rb', line 11 def name @name end |