aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/diagram.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-07 06:56:46 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-07 06:56:46 +0000
commit4b93d732e406957e094e848093517359b9ffecf4 (patch)
tree5e0fb8892ff9555967b61e4ba41d8d4901c2c159 /lib/rdoc/diagram.rb
parentb9127221e5c28ab677c56fc5885259e90647e2a8 (diff)
downloadruby-4b93d732e406957e094e848093517359b9ffecf4.tar.gz
Convert RDoc to OptionParser, clean up -h output, namespace Options under RDoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/diagram.rb')
-rw-r--r--lib/rdoc/diagram.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/rdoc/diagram.rb b/lib/rdoc/diagram.rb
index d258a14d24..3b6547905c 100644
--- a/lib/rdoc/diagram.rb
+++ b/lib/rdoc/diagram.rb
@@ -4,11 +4,11 @@
# You must have the V1.7 or later in your path
# http://www.research.att.com/sw/tools/graphviz/
-require "rdoc/dot"
-require 'rdoc/options'
+require 'rdoc/dot'
module RDoc
+ ##
# Draw a set of diagrams representing the modules and classes in the
# system. We draw one diagram for each file, and one for each toplevel
# class or module. This means there will be overlap. However, it also
@@ -167,7 +167,7 @@ module RDoc
def add_classes(container, graph, file = nil )
- use_fileboxes = Options.instance.fileboxes
+ use_fileboxes = @options.fileboxes
files = {}
@@ -281,7 +281,7 @@ module RDoc
def convert_to_png(file_base, graph)
str = graph.to_s
return @diagram_cache[str] if @diagram_cache[str]
- op_type = Options.instance.image_format
+ op_type = @options.image_format
dotfile = File.join(DOT_PATH, file_base)
src = dotfile + ".dot"
dot = dotfile + "." + op_type
@@ -332,4 +332,6 @@ module RDoc
return res
end
end
+
end
+