Exception: StateMachines::InvalidEvent

Inherits:
Error
  • Object
show all
Defined in:
lib/state_machines/error.rb

Overview

An invalid event was specified

Instance Attribute Summary collapse

Attributes inherited from Error

#object

Instance Method Summary collapse

Constructor Details

#initialize(object, event_name) ⇒ InvalidEvent

:nodoc:



50
51
52
53
54
# File 'lib/state_machines/error.rb', line 50

def initialize(object, event_name) #:nodoc:
  @event = event_name

  super(object, "#{event.inspect} is an unknown state machine event")
end

Instance Attribute Details

#eventObject (readonly)

The event that was attempted to be run



48
49
50
# File 'lib/state_machines/error.rb', line 48

def event
  @event
end