Class: Codebreaker::User

Inherits:
Object
  • Object
show all
Extended by:
Validations
Defined in:
lib/codebreaker/user.rb

Constant Summary

Constants included from Validations

Validations::ERROR_GUESS, Validations::ERROR_NAME, Validations::MAX_LENGTH, Validations::MIN_LENGTH

Constants included from Constants::Shared

Constants::Shared::CORRECT_RANGE, Constants::Shared::LENGTH_GOOD, Constants::Shared::REGULAR_FOR_CODE, Constants::Shared::TYPE_OF_DIFFICULTY, Constants::Shared::WINNING_INDEX

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Validations

validate_for_name

Constructor Details

#initialize(name) ⇒ User

Returns a new instance of User.



9
10
11
# File 'lib/codebreaker/user.rb', line 9

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/codebreaker/user.rb', line 7

def name
  @name
end