Class: BotFramework::Dialogs::Dialog

Inherits:
ActionSet
  • Object
show all
Defined in:
lib/bot_framework/dialogs/dialog.rb

Direct Known Subclasses

SimpleDialog

Constant Summary collapse

RESUME_REASONS =
[:completed, :not_completed, :canceled, :back, :forward, :reprompt].freeze

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, #initialize, #reload_action, #select_action_route, #select_action_routes, #trigger_action

Constructor Details

This class inherits a constructor from BotFramework::Dialogs::ActionSet

Instance Method Details

#begin(session, _opts = {}) ⇒ Object



8
9
10
# File 'lib/bot_framework/dialogs/dialog.rb', line 8

def begin(session, _opts = {})
  reply_recieved(session)
end

#dialog_resumed(session, result) ⇒ Object



16
17
18
# File 'lib/bot_framework/dialogs/dialog.rb', line 16

def dialog_resumed(session, result)
  session.error(result[:error]) if result[:error]
end

#recognize(_context) {|nil, { score: 0.1 }| ... } ⇒ Object

Yields:

  • (nil, { score: 0.1 })


20
21
22
# File 'lib/bot_framework/dialogs/dialog.rb', line 20

def recognize(_context)
  yield nil, { score: 0.1 }
end

#reply_recieved(_session, _recognize_result = {}) ⇒ Object

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/bot_framework/dialogs/dialog.rb', line 12

def reply_recieved(_session, _recognize_result = {})
  raise NotImplementedError
end