3 ms·
In ruby we have the very mature and featureful state_machine gem: https://github.com/pluginaweek/state_machine https://github.com/pluginaweek/state_machine I
by JonnieCache 12y ago
In ruby we have the very mature and featureful state_machine gem:
https://github.com/pluginaweek/state_machine https://github.com/pluginaweek/state_machine
I recently found out you can even choose to define states using arbitrary objects/functions, eg. date ranges. Sounds a bit crazy but I can see it solving certain problems very neatly.