simplificator-fsm 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +14 -0
- data/VERSION.yml +1 -1
- data/lib/fsm.rb +7 -0
- data/test/water_sample_test.rb +0 -1
- metadata +1 -1
data/README.markdown
CHANGED
@@ -42,5 +42,19 @@ FSM is a simple finite state machine
|
|
42
42
|
w.cool_down # again... it's the name of the transition
|
43
43
|
w.state_of_material
|
44
44
|
|
45
|
+
## Graphviz / Dot format
|
46
|
+
FSM supports the dot format of graphviz (http://www.graphviz.org/).
|
47
|
+
If you have the graphviz tools installed (the dot executable must be on the path) then
|
48
|
+
you can export a graph to png like this
|
49
|
+
# Export to water.png in the current dir
|
50
|
+
Water.dot
|
51
|
+
# Export in another format. (see graphviz documentation for supported file formats)
|
52
|
+
Water.dot(:format => :foo)
|
53
|
+
# Change the extension (defaults to the format)
|
54
|
+
Water.dot(:format => :jpg, :extension => :jpeg)
|
55
|
+
# Specify a custom file
|
56
|
+
Water.dot(:outfile => '/afile.png')
|
57
|
+
|
58
|
+
|
45
59
|
## Copyright
|
46
60
|
Copyright (c) 2009 simplificator GmbH. See LICENSE for details.
|
data/VERSION.yml
CHANGED
data/lib/fsm.rb
CHANGED
data/test/water_sample_test.rb
CHANGED