| Class | SynFlowFactory |
| In: |
lib/syn_flow.rb
|
| Parent: | Object |
The SynFlowFactory define the common part for a set of flows.
A SynFlow is like an automaton (finite state machine):
* states * transitions * an alphabet * an initial state * a set of final states
With this automaton (diagram, graph…) you can easily describe important steps of your program control flow.
Your automaton describe a model of execution and constraint every execution to it.
When a thread want to change the state of its flow it proceed like that:
flow << :a_symbol_of_the_alphabet
If a transition between the current state and a state destination is labeled by symbol, then the state is updated to destination. Otherwise the thread is constraint to wait the modification of the current state.
See examples below to know how to use these class.
| initial | [RW] | |
| transitions | [RW] |
# File lib/syn_flow.rb, line 144 def include? ( *transition ) @transitions.include?(*transition) end