Class: Gantty::Resource
- Inherits:
-
Object
- Object
- Gantty::Resource
- Defined in:
- lib/gantty.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#phone ⇒ Object
Returns the value of attribute phone.
Instance Method Summary collapse
-
#initialize(r) ⇒ Resource
constructor
A new instance of Resource.
Constructor Details
#initialize(r) ⇒ Resource
Returns a new instance of Resource.
71 72 73 74 75 76 |
# File 'lib/gantty.rb', line 71 def initialize r @name = r.attributes["name"] @phone = r.attributes["phone"] @email = r.attributes["contacts"] @id = r.attributes["id"].to_i end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
68 69 70 |
# File 'lib/gantty.rb', line 68 def email @email end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
69 70 71 |
# File 'lib/gantty.rb', line 69 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
68 69 70 |
# File 'lib/gantty.rb', line 68 def name @name end |
#phone ⇒ Object
Returns the value of attribute phone.
68 69 70 |
# File 'lib/gantty.rb', line 68 def phone @phone end |