
[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
-
Jonathan Stott (namelessjon) December 12th, 2008 @ 01:24 PM
- Assigned user changed from Sam Smoot to Dan Kubb (dkubb)
- Tag changed from feature, patch to dm-more, feature, patch, state-machine
- State changed from new to hold
Dan, again, could you have look at this?
It seems like a good idea, and the patch does apply cleanly to the current edge, with the specs still green.
-
Jonathan Stott (namelessjon) December 12th, 2008 @ 01:25 PM
- Title changed from dm-is-state_machine - generic transition! method to [PATCH] dm-is-state_machine - generic transition! method
-
Dan Kubb (dkubb) December 12th, 2008 @ 03:07 PM
- State changed from hold to resolved
This ticket should be resolved with the following commit:
http://github.com/sam/dm-more/co...
Thanks for the patch!
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »