4 ms·
As a regular user of the state_machine Ruby gem, I wouldn't recommend it. If you don't believe me, just check out the "Class definition" section of the usage ex
by stevebmark 4y ago
As a regular user of the state_machine Ruby gem, I wouldn't recommend it. If you don't believe me, just check out the "Class definition" section of the usage examples: https://github.com/state-machines/state_machines#usage https://github.com/state-machines/state_machines#usage
The problems are obvious. It's built on magic and indirection. This leads to difficult to debug state machine problems. For anything beyond simple state machines you quickly lose any idea of what your object is doing.
- Arubis 4y agoI’d strongly recommend Statesman instead: https://gocardless.com/blog/statesman/ https://gocardless.com/blog/statesman/ I’m unaffiliated, just have used a lot of Ruby SM libraries.
- stevebmark 4y agoLooks just as bad tbh, mixins and magic, I don't think you can really do this well in Ruby.