Class: Bizflow::InputActionInterpreter

Inherits:
Object
  • Object
show all
Defined in:
lib/bizflow/interpreters/input_action_interpreter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ InputActionInterpreter

Returns a new instance of InputActionInterpreter.



9
10
11
# File 'lib/bizflow/interpreters/input_action_interpreter.rb', line 9

def initialize(name)
  @action = Bizflow::SemanticModel::InputAction.new(name)
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



7
8
9
# File 'lib/bizflow/interpreters/input_action_interpreter.rb', line 7

def action
  @action
end

Instance Method Details

#description(description) ⇒ Object



13
14
15
# File 'lib/bizflow/interpreters/input_action_interpreter.rb', line 13

def description(description)
  action.description = description
end

#handler(name, options = {}) ⇒ Object



17
18
19
20
# File 'lib/bizflow/interpreters/input_action_interpreter.rb', line 17

def handler(name, options = {})
  raise "handler for action already defined" if action.handler
  action.handler = Bizflow::SemanticModel::Handler.new(name, options)
end

#next_actions(actions_hash) ⇒ Object



22
23
24
25
# File 'lib/bizflow/interpreters/input_action_interpreter.rb', line 22

def next_actions(actions_hash)
  raise "next actions already defined" if !action.next_actions.empty?
  action.next_actions = actions_hash
end

#question(question) ⇒ Object



27
28
29
# File 'lib/bizflow/interpreters/input_action_interpreter.rb', line 27

def question(question)
  action.question = question
end

#roles(roles_array) ⇒ Object



31
32
33
# File 'lib/bizflow/interpreters/input_action_interpreter.rb', line 31

def roles(roles_array)

end