To support user input validation logic I'm writing, I need the ability to ask a model if it will allow an event to transition. If the event were name "close" then something like "can_close?". Without a method, I've had to reach deep into the internals of stateflow from my model.
def can_close?
self.class.machine.events[:close].send(:transitions).select do |transition|
transition.from.include? current_state.try(:name)
end.first.try(:can_transition?, self)
end