def transitions_for(object, requirements = {})
      match(requirements).map { |event| event.transition_for(object, requirements) }.compact
    end
def transitions_for(object, requirements = {})
      match(requirements).map { |event| event.transition_for(object, requirements) }.compact
    end
Gets the list of transitions that can be run on the given object.

 Valid requirement options:
 * <tt>:from</tt> - One or more states being transitioned from.  If none
   are specified, then this will be the object's current state.
 * <tt>:to</tt> - One or more states being transitioned to.  If none are
   specified, then this will match any to state.
 * <tt>:on</tt> - One or more events that fire the transition.  If none
   are specified, then this will match any event.
 * <tt>:guard</tt> - Whether to guard transitions with the if/unless
   conditionals defined for each one.  Default is true.

 == Examples

   class Vehicle
     state_machine :initial => :parked do
       event :park do
         transition :idling => :parked
       end

       event :ignite do
         transition :parked => :idling
       end
     end
   end

   events = Vehicle.state_machine.events

   vehicle = Vehicle.new                             # => #<Vehicle:0xb7c464b0 @state="parked">
   events.transitions_for(vehicle)                   # => [#<StateMachines::Transition attribute=:state event=:ignite from="parked" from_name=:parked to="idling" to_name=:idling>]

   vehicle.state = 'idling'
   events.transitions_for(vehicle)                   # => [#<StateMachines::Transition attribute=:state event=:park from="idling" from_name=:idling to="parked" to_name=:parked>]

   # Search for explicit transitions regardless of the current state
   events.transitions_for(vehicle, :from => :parked) # => [#<StateMachines::Transition attribute=:state event=:ignite from="parked" from_name=:parked to="idling" to_name=:idling>]