Class: Socrates::SampleStates::RaiseError

Inherits:
Object
  • Object
show all
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

#end_conversation, #initialize, #next_state_action, #next_state_id, #repeat_action, #respond, #send_message, #transition_to

Instance Method Details

#askObject



195
196
197
# File 'lib/socrates/sample_states.rb', line 195

def ask
  respond message: "I will raise an error regardless of what you enter next..."
end

#listen(_message) ⇒ Object

Raises:

  • (ArgumentError)


199
200
201
# File 'lib/socrates/sample_states.rb', line 199

def listen(_message)
  raise ArgumentError, "Boom!"
end