Introducing the PxGraphViz gem

The PxGraphViz gem generates a GraphViz Markup Language file as can been seen in the example below.

require 'pxgraphviz'

s = "
<?polyrex schema='items/item[label, connection]' delimiter =' # '?>

hello
  world # link 1
    run # link 2
    walk # link 3
      fun # link 4
  fun # link 5
"

pxg = PxGraphViz.new(s)
File.write 'gvml.xml', pxg.to_doc.xml(pretty: true)

Output

The PNG below was generated using the GraphVizML gem.

GraphViz diagram

Resources