Class: ActiveCollab::Project
- Inherits:
-
Object
- Object
- ActiveCollab::Project
- Defined in:
- lib/active_collab/project.rb
Instance Attribute Summary collapse
-
#category_id ⇒ Object
Returns the value of attribute category_id.
-
#company_id ⇒ Object
Returns the value of attribute company_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_completed ⇒ Object
Returns the value of attribute is_completed.
-
#is_member ⇒ Object
Returns the value of attribute is_member.
-
#label_id ⇒ Object
Returns the value of attribute label_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#permalink ⇒ Object
Returns the value of attribute permalink.
-
#state ⇒ Object
Returns the value of attribute state.
Class Method Summary collapse
Instance Attribute Details
#category_id ⇒ Object
Returns the value of attribute category_id.
2 3 4 |
# File 'lib/active_collab/project.rb', line 2 def category_id @category_id end |
#company_id ⇒ Object
Returns the value of attribute company_id.
2 3 4 |
# File 'lib/active_collab/project.rb', line 2 def company_id @company_id end |
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/active_collab/project.rb', line 2 def id @id end |
#is_completed ⇒ Object
Returns the value of attribute is_completed.
2 3 4 |
# File 'lib/active_collab/project.rb', line 2 def is_completed @is_completed end |
#is_member ⇒ Object
Returns the value of attribute is_member.
2 3 4 |
# File 'lib/active_collab/project.rb', line 2 def is_member @is_member end |
#label_id ⇒ Object
Returns the value of attribute label_id.
2 3 4 |
# File 'lib/active_collab/project.rb', line 2 def label_id @label_id end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/active_collab/project.rb', line 2 def name @name end |
#permalink ⇒ Object
Returns the value of attribute permalink.
2 3 4 |
# File 'lib/active_collab/project.rb', line 2 def permalink @permalink end |
#state ⇒ Object
Returns the value of attribute state.
2 3 4 |
# File 'lib/active_collab/project.rb', line 2 def state @state end |
Class Method Details
.from_hash(hash) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/active_collab/project.rb', line 6 def self.from_hash(hash) project = ActiveCollab::Project.new project.id = hash["id"].to_i project.name = hash["name"] project.permalink = hash["permalink"] project.state = hash["state"].to_i project.is_completed = hash["is_completed"].to_i project.category_id = hash["category_id"].to_i project.label_id = hash["label_id"].to_i project.company_id = hash["company_.to_iid"].to_i project.is_member = hash["is_member"].to_i project end |