Module: Statesman::Machine::ClassMethods

Defined in:
lib/statesman/machine/class_methods.rb

Instance Method Summary collapse

Instance Method Details

#diagramStatesman::Diagram



7
8
9
# File 'lib/statesman/machine/class_methods.rb', line 7

def diagram
  Diagram.new(name: name.gsub('::', '_'), graph: successors)
end

#to_dotString



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