Class: BotFramework::Dialogs::SimpleDialog
- Inherits:
-
Dialog
show all
- Defined in:
- lib/bot_framework/dialogs/simple_dialog.rb
Constant Summary
Constants inherited
from Dialog
Dialog::RESUME_REASONS
Instance Attribute Summary
Attributes inherited from ActionSet
#actions
Instance Method Summary
collapse
Methods inherited from ActionSet
#add_dialog_trigger, #begin_dialog_action, #cancel_action, #clone, #dialog_interrupted, #end_conversation_action, #find_action_routes, #reload_action, #select_action_route, #select_action_routes, #trigger_action
Constructor Details
Returns a new instance of SimpleDialog.
7
8
9
10
|
# File 'lib/bot_framework/dialogs/simple_dialog.rb', line 7
def initialize
raise 'No block given' unless block_given?
super
end
|
Instance Method Details
#begin(session, _opts = {}) ⇒ Object
12
13
14
|
# File 'lib/bot_framework/dialogs/simple_dialog.rb', line 12
def begin(session, _opts = {})
reply_recieved(session)
end
|
#dialog_resumed(session, result) ⇒ Object
20
21
22
|
# File 'lib/bot_framework/dialogs/simple_dialog.rb', line 20
def dialog_resumed(session, result)
session.error(result[:error]) if result[:error]
end
|
#recognize(_context) {|nil, { score: 0.1 }| ... } ⇒ Object
24
25
26
|
# File 'lib/bot_framework/dialogs/simple_dialog.rb', line 24
def recognize(_context)
yield nil, { score: 0.1 }
end
|
#reply_recieved(_session, _recognize_result = {}) ⇒ Object
16
17
18
|
# File 'lib/bot_framework/dialogs/simple_dialog.rb', line 16
def reply_recieved(_session, _recognize_result = {})
raise NotImplementedError
end
|