Module: SimpleStateMachine::Extendable

Included in:
SimpleStateMachine, ActiveRecord
Defined in:
lib/simple_state_machine/simple_state_machine.rb

Overview

Adds state machine methods to the extended class

Instance Method Summary collapse

Instance Method Details

#event(event_name, state_transitions) ⇒ Object

mark the method as an event and specify how the state should transition



33
34
35
# File 'lib/simple_state_machine/simple_state_machine.rb', line 33

def event event_name, state_transitions
  state_machine_definition.define_event event_name, state_transitions
end