def transition(options)
      raise ArgumentError, 'Must specify as least one transition requirement' if options.empty?
      
      # Only a certain subset of explicit options are allowed for transition
      # requirements
      assert_valid_keys(options, :from, :to, :except_from, :except_to, :if, :unless) if (options.keys - [:from, :to, :on, :except_from, :except_to, :except_on, :if, :unless]).empty?
      
      branches << branch = Branch.new(options.merge(:on => name))
      @known_states |= branch.known_states
      branch
    end
def transition(options)
      raise ArgumentError, 'Must specify as least one transition requirement' if options.empty?
      
      # Only a certain subset of explicit options are allowed for transition
      # requirements
      assert_valid_keys(options, :from, :to, :except_from, :except_to, :if, :unless) if (options.keys - [:from, :to, :on, :except_from, :except_to, :except_on, :if, :unless]).empty?
      
      branches << branch = Branch.new(options.merge(:on => name))
      @known_states |= branch.known_states
      branch
    end
Creates a new transition that determines what to change the current state
 to when this event fires.

 Since this transition is being defined within an event context, you do
 *not* need to specify the <tt>:on</tt> option for the transition.  For
 example:

  state_machine do
    event :ignite do
      transition :parked => :idling, :idling => same, :if => :seatbelt_on? # Transitions to :idling if seatbelt is on
      transition all => :parked, :unless => :seatbelt_on?                  # Transitions to :parked if seatbelt is off
    end
  end

 See StateMachine::Machine#transition for a description of the possible
 configurations for defining transitions.