Method: EndState::StateMachine#transition

Defined in:
lib/end_state/state_machine.rb

#transition(end_state, params = {}, mode = self.class.mode) ⇒ Object



21
22
23
24
25
# File 'lib/end_state/state_machine.rb', line 21

def transition(end_state, params = {}, mode = self.class.mode)
  __sm_reset_messages
  return __sm_block_transistion(end_state.to_sym, mode) unless __sm_transition_configuration_for(state.to_sym, end_state.to_sym)
  __sm_transition_for(end_state.to_sym, mode).call(params)
end