Skip to content

Instantly share code, notes, and snippets.

@axgle
Created November 5, 2009 02:30
Show Gist options
  • Save axgle/226648 to your computer and use it in GitHub Desktop.
Save axgle/226648 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'graphviz'
class GraphViz
class Edge
def [](xAttrName)
if Hash===xAttrName
for name,value in xAttrName
self[name]=value
end
else
@oAttrEdge[xAttrName.to_s].clone
end
end
end
end
GraphViz.new(:G){|g|
(g.hello-g.world) [:style=>:bold,:label=>" axgle says"]
}.save(:png=>"axgle.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment