Class: Dolmade::Person
- Inherits:
-
Object
- Object
- Dolmade::Person
- Defined in:
- lib/dolmade.rb
Instance Attribute Summary collapse
-
#age ⇒ Object
Returns the value of attribute age.
-
#country ⇒ Object
Returns the value of attribute country.
-
#gender ⇒ Object
Returns the value of attribute gender.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(obj) ⇒ Person
constructor
A new instance of Person.
Constructor Details
#initialize(obj) ⇒ Person
Returns a new instance of Person.
45 46 47 48 49 50 |
# File 'lib/dolmade.rb', line 45 def initialize(obj) self.age = obj['age'] self.gender = obj['gender'] self.country = obj['country'] self.state = obj['state'] end |
Instance Attribute Details
#age ⇒ Object
Returns the value of attribute age.
43 44 45 |
# File 'lib/dolmade.rb', line 43 def age @age end |
#country ⇒ Object
Returns the value of attribute country.
43 44 45 |
# File 'lib/dolmade.rb', line 43 def country @country end |
#gender ⇒ Object
Returns the value of attribute gender.
43 44 45 |
# File 'lib/dolmade.rb', line 43 def gender @gender end |
#state ⇒ Object
Returns the value of attribute state.
43 44 45 |
# File 'lib/dolmade.rb', line 43 def state @state end |