lib/rgl/dot.rb in rgl-0.5.9 vs lib/rgl/dot.rb in rgl-0.5.10
- old
+ new
@@ -1,14 +1,12 @@
# dot.rb
#
-# $Id$
-#
# Minimal Dot support, based on Dave Thomas's dot module (included in rdoc).
# rdot.rb is a modified version which also contains support for undirected
# graphs.
#
-# You need to have [GraphViz](http://www.graphviz.org) installed, because the
+# You need to have [GraphViz](https://www.graphviz.org) installed, because the
# functions in this modul execute the GraphViz executables _dot_ or _dotty_.
require 'rgl/rdot'
module RGL
@@ -22,12 +20,12 @@
def vertex_id(v)
v
end
- # Return a RGL::DOT::Digraph for directed graphs or a DOT::Graph for an
- # undirected Graph. _params_ can contain any graph property specified in
+ # Return a {DOT::Digraph} for directed graphs or a {DOT::Graph} for an
+ # undirected {Graph}. _params_ can contain any graph property specified in
# rdot.rb.
#
def to_dot_graph(params = {})
params['name'] ||= self.class.name.gsub(/:/, '_')
fontsize = params['fontsize'] ? params['fontsize'] : '8'
@@ -65,11 +63,11 @@
#
def print_dotted_on(params = {}, s = $stdout)
s << to_dot_graph(params).to_s << "\n"
end
- # Call dotty[http://www.graphviz.org] for the graph which is written to the
+ # Call dotty[https://www.graphviz.org] for the graph which is written to the
# file 'graph.dot' in the current directory.
#
def dotty(params = {})
dotfile = "graph.dot"
File.open(dotfile, "w") do |f|
@@ -78,10 +76,10 @@
unless system("dotty", dotfile)
raise "Error executing dotty. Did you install GraphViz?"
end
end
- # Use dot[http://www.graphviz.org] to create a graphical representation of
+ # Use dot[https://www.graphviz.org] to create a graphical representation of
# the graph. Returns the filename of the graphics file.
#
def write_to_graphic_file(fmt='png', dotfile="graph", options={})
src = dotfile + ".dot"
dot = dotfile + "." + fmt