class BotPlatform::Dialogs::Dialog

Constants

END_OF_TURN

Attributes

id[R]

Public Class Methods

new(dialog_id) click to toggle source
# File lib/bot_platform/dialogs/dialog.rb, line 11
def initialize(dialog_id)
  assert_dialog_id_is_valid dialog_id

  @id = dialog_id
end

Public Instance Methods

continue(dc) click to toggle source

called after user has new activity params:

dc: DialogContext
# File lib/bot_platform/dialogs/dialog.rb, line 26
def continue(dc)
  # by default just stop the dialog
  return dc.stop
end
reprompt(turn_context, instance) click to toggle source

not-implemented

# File lib/bot_platform/dialogs/dialog.rb, line 40
def reprompt(turn_context, instance)
end
resume(dc, result) click to toggle source

called after pre-dialog was poped params:

dc: DialogContext
# File lib/bot_platform/dialogs/dialog.rb, line 34
def resume(dc, result)
  # by default just stop the dialog
  stop result
end
start(dc) click to toggle source

abstract start the instance when ready

# File lib/bot_platform/dialogs/dialog.rb, line 19
def start(dc)
  raise "unimplemented"
end
stop(result) click to toggle source

called by #DialogContext#stop_active_dialog if need to stop dialog

# File lib/bot_platform/dialogs/dialog.rb, line 44
def stop(result)
end