Class: Sinbotra::Bot::Conversation

Inherits:
Object
  • Object
show all
Defined in:
lib/sinbotra/bot/conversation.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bot, platform) ⇒ Conversation

Returns a new instance of Conversation.



13
14
15
16
17
18
# File 'lib/sinbotra/bot/conversation.rb', line 13

def initialize(bot, platform)
  @bot          = bot
  @current_user = bot.current_user
  @message      = bot.message
  @platform     = platform
end

Class Attribute Details

._stepsObject (readonly)

Returns the value of attribute _steps.



4
5
6
# File 'lib/sinbotra/bot/conversation.rb', line 4

def _steps
  @_steps
end

Instance Method Details

#continue_dialogueObject



24
25
26
# File 'lib/sinbotra/bot/conversation.rb', line 24

def continue_dialogue
  run_step!(current_user.conversation.step, message)
end

#startObject



20
21
22
# File 'lib/sinbotra/bot/conversation.rb', line 20

def start
  run_step!(current_user.conversation.step, message)
end