Skip to content

Added wildcard support for events source, final state definition

Compare
Choose a tag to compare
@mriehl mriehl released this 23 Sep 07:45
· 119 commits to master since this release

Props go to @ctbk for the features.

Now you can define events which are valid in every state of the FSM, by using src='*' in the event definition or even by omitting the src attribute.

If you define the final state of the state machine, the shorthand method is_finished() returns true if the machine is in that particular state.

Both features are ported from Jake Gordon's FSM.