alexpeachey / end_state

A State Machine implementation
MIT License
9 stars 5 forks source link

Access to transition name within concluder #31

Open guillewu opened 9 years ago

guillewu commented 9 years ago

It would be nice to have access to the transition name ("invite" in the case below) within the concluders.

transition reserved: :sent, as: :invite do |t|
    t.guard PlayerExists
    t.concluder NotifySent
    t.concluder PusherSendAlert
  end
alexpeachey commented 9 years ago

What would be the use case here? The guards and concluders should be all about moving from one state to another. It shouldn't really matter whether that transition was evoked by an event or calling transition. What benefit does knowing how it was invoked give you?