Class: Paymo::Project
- Inherits:
-
Object
- Object
- Paymo::Project
- Defined in:
- lib/paymo/models/project.rb
Instance Attribute Summary collapse
-
#budget_hours ⇒ Object
Returns the value of attribute budget_hours.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_name ⇒ Object
Returns the value of attribute client_name.
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#price_per_hour ⇒ Object
Returns the value of attribute price_per_hour.
-
#retired ⇒ Object
Returns the value of attribute retired.
-
#users ⇒ Object
Returns the value of attribute users.
Instance Method Summary collapse
-
#initialize(result) ⇒ Project
constructor
A new instance of Project.
Constructor Details
#initialize(result) ⇒ Project
Returns a new instance of Project.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/paymo/models/project.rb', line 7 def initialize(result) @id = result['id'].to_i @retired = !!result['retired'] @name = result['name']['_content'] @description = result['description']['_content'] @budget_hours = result['budget_hours']['_content'].to_f @price_per_hour = result['price_per_hour']['_content'].to_f @client_id = result['client']['id'].to_i @client_name = result['client']['name'] @users = result['users'] end |
Instance Attribute Details
#budget_hours ⇒ Object
Returns the value of attribute budget_hours.
4 5 6 |
# File 'lib/paymo/models/project.rb', line 4 def budget_hours @budget_hours end |
#client_id ⇒ Object
Returns the value of attribute client_id.
4 5 6 |
# File 'lib/paymo/models/project.rb', line 4 def client_id @client_id end |
#client_name ⇒ Object
Returns the value of attribute client_name.
4 5 6 |
# File 'lib/paymo/models/project.rb', line 4 def client_name @client_name end |
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/paymo/models/project.rb', line 4 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/paymo/models/project.rb', line 4 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/paymo/models/project.rb', line 4 def name @name end |
#price_per_hour ⇒ Object
Returns the value of attribute price_per_hour.
4 5 6 |
# File 'lib/paymo/models/project.rb', line 4 def price_per_hour @price_per_hour end |
#retired ⇒ Object
Returns the value of attribute retired.
4 5 6 |
# File 'lib/paymo/models/project.rb', line 4 def retired @retired end |
#users ⇒ Object
Returns the value of attribute users.
4 5 6 |
# File 'lib/paymo/models/project.rb', line 4 def users @users end |