Class: Codebreaker::User

Inherits:
Object
  • Object
show all
Extended by:
Validation
Includes:
Valid
Defined in:
lib/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Validation

validate

Methods included from Valid

#valid?

Constructor Details

#initialize(name) ⇒ User

Returns a new instance of User.



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

def initialize(name)
  @name = name
  validate!
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end