Class: Caseblocks::Task
- Inherits:
-
Object
- Object
- Caseblocks::Task
- Defined in:
- lib/caseblocks/task.rb
Overview
Class Method Summary collapse
Instance Method Summary collapse
- #action_type ⇒ Object
- #assign_to(user) ⇒ Object
- #complete ⇒ Object
- #description ⇒ Object
- #execute ⇒ Object
- #id ⇒ Object
-
#initialize(task_data, client) ⇒ Task
constructor
A new instance of Task.
- #schedule_at(date) ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(task_data, client) ⇒ Task
Returns a new instance of Task.
15 16 17 18 |
# File 'lib/caseblocks/task.rb', line 15 def initialize(task_data, client) @client = client @task_data = task_data end |
Class Method Details
Instance Method Details
#action_type ⇒ Object
26 27 28 |
# File 'lib/caseblocks/task.rb', line 26 def action_type @task_data["action_type"] end |
#assign_to(user) ⇒ Object
47 48 49 |
# File 'lib/caseblocks/task.rb', line 47 def assign_to(user) raise "Not Implemented" end |
#complete ⇒ Object
41 42 43 |
# File 'lib/caseblocks/task.rb', line 41 def complete raise "Not Implemented" end |
#description ⇒ Object
23 24 25 |
# File 'lib/caseblocks/task.rb', line 23 def description @task_data["description"] end |
#execute ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/caseblocks/task.rb', line 30 def execute if ["ModifyCaseActionTask", "JavascriptActionTask"].include? @task_data["action_type"] raise "Not Implemented" else raise "Can only execute a JavascriptActionTask or ModifyCaseActionTask" end end |
#id ⇒ Object
20 21 22 |
# File 'lib/caseblocks/task.rb', line 20 def id @task_data["id"] end |
#schedule_at(date) ⇒ Object
44 45 46 |
# File 'lib/caseblocks/task.rb', line 44 def schedule_at(date) raise "Not Implemented" end |
#start ⇒ Object
38 39 40 |
# File 'lib/caseblocks/task.rb', line 38 def start raise "Not Implemented" end |