Class: ActiveCollab::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/active_collab/project.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#category_idObject

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_idObject

Returns the value of attribute company_id.



2
3
4
# File 'lib/active_collab/project.rb', line 2

def company_id
  @company_id
end

#idObject

Returns the value of attribute id.



2
3
4
# File 'lib/active_collab/project.rb', line 2

def id
  @id
end

#is_completedObject

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_memberObject

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_idObject

Returns the value of attribute label_id.



2
3
4
# File 'lib/active_collab/project.rb', line 2

def label_id
  @label_id
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/active_collab/project.rb', line 2

def name
  @name
end

Returns the value of attribute permalink.



2
3
4
# File 'lib/active_collab/project.rb', line 2

def permalink
  @permalink
end

#stateObject

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