Class: ActiveCollab::Task

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#assignee_idObject

Returns the value of attribute assignee_id.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def assignee_id
  @assignee_id
end

#attachments_countObject

Returns the value of attribute attachments_count.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def attachments_count
  @attachments_count
end

#attachments_urlObject

Returns the value of attribute attachments_url.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def attachments_url
  @attachments_url
end

#category_idObject

Returns the value of attribute category_id.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def category_id
  @category_id
end

#comments_countObject

Returns the value of attribute comments_count.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def comments_count
  @comments_count
end

#comments_urlObject

Returns the value of attribute comments_url.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def comments_url
  @comments_url
end

#completed_subtasksObject

Returns the value of attribute completed_subtasks.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def completed_subtasks
  @completed_subtasks
end

#delegated_by_idObject

Returns the value of attribute delegated_by_id.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def delegated_by_id
  @delegated_by_id
end

#due_onObject

Returns the value of attribute due_on.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def due_on
  @due_on
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def id
  @id
end

#is_completedObject

Returns the value of attribute is_completed.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def is_completed
  @is_completed
end

#is_lockedObject

Returns the value of attribute is_locked.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def is_locked
  @is_locked
end

#label_idObject

Returns the value of attribute label_id.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def label_id
  @label_id
end

#milestone_idObject

Returns the value of attribute milestone_id.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def milestone_id
  @milestone_id
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def name
  @name
end

#open_subtasksObject

Returns the value of attribute open_subtasks.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def open_subtasks
  @open_subtasks
end

#other_assignee_idsObject

Returns the value of attribute other_assignee_ids.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def other_assignee_ids
  @other_assignee_ids
end

Returns the value of attribute permalink.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def permalink
  @permalink
end

#priorityObject

Returns the value of attribute priority.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def priority
  @priority
end

#project_idObject

Returns the value of attribute project_id.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def project_id
  @project_id
end

#stateObject

Returns the value of attribute state.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def state
  @state
end

#subtasks_urlObject

Returns the value of attribute subtasks_url.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def subtasks_url
  @subtasks_url
end

#task_idObject

Returns the value of attribute task_id.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def task_id
  @task_id
end

#total_subtasksObject

Returns the value of attribute total_subtasks.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def total_subtasks
  @total_subtasks
end

#user_is_subscribedObject

Returns the value of attribute user_is_subscribed.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def user_is_subscribed
  @user_is_subscribed
end

#versionObject

Returns the value of attribute version.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def version
  @version
end

#visibilityObject

Returns the value of attribute visibility.



3
4
5
# File 'lib/active_collab/task.rb', line 3

def visibility
  @visibility
end

Class Method Details

.from_hash(hash) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/active_collab/task.rb', line 11

def self.from_hash(hash)
	task = ActiveCollab::Task.new
	task.id = hash["id"].to_i
	task.name = hash["name"]
	task.permalink = hash["permalink"]
	task.state = hash["state"].to_i
	task.is_completed = hash["is_completed"].to_i
	task.comments_url = hash["comments_url"]
	task.comments_count = hash["comments_count"].to_i
	task.is_locked = hash["is_locked"].to_i
	task.subtasks_url = hash["subtasks_url"]
	task.total_subtasks = hash["total_subtasks"].to_i
	task.open_subtasks = hash["open_subtasks"].to_i
	task.completed_subtasks = hash["completed_subtasks"].to_i
	task.attachments_url = hash["attachments_url"]
	task.attachments_count = hash["attachments_count"].to_i
	task.assignee_id = hash["assignee_id"].to_i
	task.delegated_by_id = hash["delegated_by_id"].to_i
	task.other_assignee_ids = hash["other_assignee_ids"]
	task.category_id = hash["category_id"].to_i
	task.label_id = hash["label_id"].to_i
	task.user_is_subscribed = hash["user_is_subscribed"].to_i
	task.version = hash["version"]
	task.priority = hash["priority"].to_i
	task.due_on = hash["due_on"].to_i
	task.project_id = hash["project_id"].to_i
	task.milestone_id = hash["milestone_id"].to_i
	task.task_id = hash["task_id"].to_i
	task
end