Method: RGL::Graph#dotty

Defined in:
lib/rgl/dot.rb

#dotty(params = {}) ⇒ Object

Call dotty for the graph which is written to the file ‘graph.dot’ in the current directory.



103
104
105
106
107
108
109
110
111
# File 'lib/rgl/dot.rb', line 103

def dotty(params = {})
  dotfile = "graph.dot"
  File.open(dotfile, "w") do |f|
    print_dotted_on(params, f)
  end
  unless system("dotty", dotfile)
    raise "Error executing dotty. Did you install GraphViz?"
  end
end