Open gamesover opened 5 years ago
I don't know if that is possible.
MyClass.state_machine.events[:stop].branches.flat_map(&:state_requirements).flat_map { |sr| sr[:from].description }.uniq
Something like this could help but there is a Problem mit StateMachines::BlacklistMatcher
s
FYI: This gem is abandoned, it has been forked at: https://github.com/state-machines/state_machines
I want to get the list of eligible states, such as
MyClass.state_machine.events[:stop][:from]
, get result of[0]