Class: Bizflow::InputActionInterpreter
- Inherits:
-
Object
- Object
- Bizflow::InputActionInterpreter
- Defined in:
- lib/bizflow/interpreters/input_action_interpreter.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
Instance Method Summary collapse
- #description(description) ⇒ Object
- #handler(name, options = {}) ⇒ Object
-
#initialize(name) ⇒ InputActionInterpreter
constructor
A new instance of InputActionInterpreter.
- #next_actions(actions_hash) ⇒ Object
- #question(question) ⇒ Object
- #roles(roles_array) ⇒ Object
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
#action ⇒ Object
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, = {}) raise "handler for action already defined" if action.handler action.handler = Bizflow::SemanticModel::Handler.new(name, ) 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 |