Class: Codebreakergem::User

Inherits:
Object
  • Object
show all
Includes:
Checker
Defined in:
lib/classes/user.rb

Constant Summary

Constants included from Checker

Checker::ALLOWED_LENGTH

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Checker

#validate_string_length

Constructor Details

#initialize(name) ⇒ User

Returns a new instance of User.



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

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/classes/user.rb', line 13

def valid?
  validate_string_length(name)
end