Class: Bizflow::SemanticModel::TaskAction

Inherits:
Action
  • Object
show all
Defined in:
lib/bizflow/semantic_model/task_action.rb

Instance Attribute Summary collapse

Attributes inherited from Action

#description, #name, #question, #type

Instance Method Summary collapse

Methods inherited from Action

#handler

Constructor Details

#initialize(name) ⇒ TaskAction

Returns a new instance of TaskAction.



10
11
12
13
# File 'lib/bizflow/semantic_model/task_action.rb', line 10

def initialize(name)
  super("task", name)
  @tasks = [] 
end

Instance Attribute Details

#next_actionObject

Returns the value of attribute next_action.



8
9
10
# File 'lib/bizflow/semantic_model/task_action.rb', line 8

def next_action
  @next_action
end

#tasksObject

Returns the value of attribute tasks.



8
9
10
# File 'lib/bizflow/semantic_model/task_action.rb', line 8

def tasks
  @tasks
end

Instance Method Details

#add_task(task) ⇒ Object



15
16
17
# File 'lib/bizflow/semantic_model/task_action.rb', line 15

def add_task(task)
  tasks << task
end

#next_actionsObject



19
20
21
# File 'lib/bizflow/semantic_model/task_action.rb', line 19

def next_actions
  { only_one: next_action }
end