def define_event_transition(event_name, silent)
      machine.send(:define_singleton_method, event_name) do |*data, &block|
        method = silent ? :transition : :trigger
        machine.public_send(method, event_name, *data, &block)
      end
    end
def define_event_transition(event_name, silent)
      machine.send(:define_singleton_method, event_name) do |*data, &block|
        method = silent ? :transition : :trigger
        machine.public_send(method, event_name, *data, &block)
      end
    end
Define transition event

 @param [Symbol] event_name
   the event name

 @param [Boolean] silent
   if true don't trigger callbacks, otherwise do

 @return [nil]

 @api private