Module: Statesman::Machine::ClassMethods
- Defined in:
- lib/statesman/machine/class_methods.rb
Instance Method Summary collapse
-
#diagram ⇒ Statesman::Diagram
Diagram for the state machine.
-
#to_dot ⇒ String
State machine in DOT format.
- #to_png(file_name = nil) ⇒ Object
Instance Method Details
#diagram ⇒ Statesman::Diagram
7 8 9 |
# File 'lib/statesman/machine/class_methods.rb', line 7 def diagram Diagram.new(name: name.gsub('::', '_'), graph: successors) end |
#to_dot ⇒ String
12 13 14 |
# File 'lib/statesman/machine/class_methods.rb', line 12 def to_dot diagram.to_dot end |
#to_png(file_name = nil) ⇒ Object
16 17 18 |
# File 'lib/statesman/machine/class_methods.rb', line 16 def to_png(file_name = nil) diagram.to_png(file_name) end |