From 9a47dd84eb6f7f963c87f25a37bf2df3436d147f Mon Sep 17 00:00:00 2001 From: Tobie Langel Date: Sat, 1 May 2010 01:29:50 +0200 Subject: [PATCH] Allow access to dependency graph options from Modulr.graph. --- lib/modulr.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/modulr.rb b/lib/modulr.rb index 5c7a516..03c3a59 100644 --- a/lib/modulr.rb +++ b/lib/modulr.rb @@ -33,9 +33,9 @@ def self.graph(file, options = {}) dir = File.dirname(file) mod_name = File.basename(file, '.js') mod = JSModule.new(mod_name, dir, file) - uri = DependencyGraph.new(mod).to_yuml - output = options[:dependency_graph] - if output == true + output = options.delete(:dependency_graph) + uri = DependencyGraph.new(mod).to_yuml(options) + if !output || output == true output = "#{dir}/#{mod_name}.png" end File.open(output, 'w').write(open(uri).read)