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
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
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/socrates/sample_states.rb', line 23 def listen() case .strip when "help" transition_to :help when "age" transition_to :ask_for_name when "error" transition_to :raise_error else transition_to :no_comprende end end |