Class: Nerdz::User
- Inherits:
-
Object
- Object
- Nerdz::User
- Defined in:
- lib/nerdz/structs.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(id, name) ⇒ User
constructor
A new instance of User.
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
#id ⇒ Object (readonly)
Returns the value of attribute id.
22 23 24 |
# File 'lib/nerdz/structs.rb', line 22 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
22 23 24 |
# File 'lib/nerdz/structs.rb', line 22 def name @name end |