def allowed?
      if_guard = options[:if]
      unless if_guard.nil?
        return false unless if_guard.call(@state_machine)
      end
      unless_guard = options[:unless]
      unless unless_guard.nil?
        return false if unless_guard.call(@state_machine)
      end
      true
    end
def allowed?
      if_guard = options[:if]
      unless if_guard.nil?
        return false unless if_guard.call(@state_machine)
      end
      unless_guard = options[:unless]
      unless unless_guard.nil?
        return false if unless_guard.call(@state_machine)
      end
      true
    end
Initializes a new {Transition} between two given states.

 Additionally, you must also supply an event trigger value as
 option. Its key must be equal to the transition class's
 +event_type+., ex. if +event_type+ is +:on+, you have to supply
 the event value using the option key +:on+.

 @param options [Hash] Configuration options for the transition.

 @option options [StateMachine::Base] :state_machine
   State machine that the transition belongs to.

 @option options [Symbol] :from
   State where the transition begins.

 @option options [Symbol] :to
   State where the transition ends.

 @option options [Proc] :if (nil)
   Block that should return a +Boolean+. If the block returns
   +false+, the transition will be blocked and not executed
   (optional).

 @option options [Proc] :unless (nil)
   Block that should return a +Boolean+. If the block returns
   +true+, the transition will be blocked and not executed
   (optional).

 @option options [Boolean] :internal (false)
   If set to true, the transition will not leave it's source
   state: Entry and Exit actions will not be called in this case.
   For internal transitions, +:from+ and +:to+ must be the same
   (optional).

 @note This method should not be used directly. To create +Transition+ objects, use {#make} instead.
 @return [Boolean] Asks the guard blocks given for +:if+ and
   +:unless+ if the transition is allowed. Returns +true+ if the
   transition is allowed to be executed.