Class: Nerdz::User

Inherits:
Object
  • Object
show all
Defined in:
lib/nerdz/structs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, name) ⇒ User

Returns a new instance of User.



23
24
25
26
# File 'lib/nerdz/structs.rb', line 23

def initialize(id, name)
  @id = id.to_i
  @name = name
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



22
23
24
# File 'lib/nerdz/structs.rb', line 22

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



22
23
24
# File 'lib/nerdz/structs.rb', line 22

def name
  @name
end