def transition!(event_name, *data, &block)
      from_state = current
      to_state   = events_map.move_to(event_name, from_state, *data)

      block.call(from_state, to_state) if block

      if log_transitions
        Logger.report_transition(event_name, from_state, to_state, *data)
      end

      try_trigger(event_name) { transition_to!(to_state) }
    end
def transition!(event_name, *data, &block)
      from_state = current
      to_state   = events_map.move_to(event_name, from_state, *data)

      block.call(from_state, to_state) if block

      if log_transitions
        Logger.report_transition(event_name, from_state, to_state, *data)
      end

      try_trigger(event_name) { transition_to!(to_state) }
    end
Find available state to transition to and transition

 @param [Symbol] event_name

 @api private