Method: Jsm::Event#execute

Defined in:
lib/jsm/event.rb

#execute(object) ⇒ Object

execute the event, and do a transition if the object current state match with the from state of a transition



31
32
33
34
35
36
37
38
39
# File 'lib/jsm/event.rb', line 31

def execute(object)
  transition = can_be_transitioning_to(object)
  if transition
    change_state_obj(object, transition.to)
    true
  else
    false
  end
end