Class: Socrates::SampleStates::GetStarted
- Inherits:
-
Object
- Object
- Socrates::SampleStates::GetStarted
- Includes:
- Core::State
- Defined in:
- lib/socrates/sample_states.rb
Instance Attribute Summary
Attributes included from Core::State
#adapter, #data, #session, #user
Instance Method Summary collapse
Methods included from Core::State
#ask, #end_conversation, #initialize, #next_state_action, #next_state_id, #repeat_action, #respond, #send_message, #transition_to
Instance Method Details
#listen(message) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/socrates/sample_states.rb', line 28 def listen() case .downcase when "help" transition_to :help when "age" transition_to :ask_for_name when "dms" transition_to :dms when "error" transition_to :raise_error else transition_to :no_comprende end end |