#549 ✓resolved
thefool808

[PATCH] dm-is-state_machine - generic transition! method

Reported by thefool808 | September 3rd, 2008 @ 01:37 PM

This patch adds a transition! method to DataMapper::Is::State::Machine::InstanceMethods that is then called from the dynamically created transition methods (e.g. forward! in the stoplight example).

This has two benefits. 1) It lets me add before and after hooks to the transition! method that will fire every time a transition occurs and 2) it allows me to overwrite the forward! method and still call the transition change with transition!

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Attachments

Pages