Module: DataMapper::Is::PersistentStateMachine::InstanceMethods
- Defined in:
- lib/dm-is-persistent_state_machine/is/persistent_state_machine.rb
Overview
ClassMethods
Instance Method Summary collapse
Instance Method Details
#after_trigger_event(event) ⇒ Object
hookable
154 155 156 |
# File 'lib/dm-is-persistent_state_machine/is/persistent_state_machine.rb', line 154 def after_trigger_event(event) end |
#trigger_event!(event_code, user) ⇒ Object
144 145 146 147 148 149 150 151 |
# File 'lib/dm-is-persistent_state_machine/is/persistent_state_machine.rb', line 144 def trigger_event!(event_code, user) # cache prev_state and the user that is triggering the event @prev_state = self.state @updating_user = user # delegate to State#trigger! self.state.trigger_event!(self, event_code) end |