Skip to content

Commit

Permalink
Allow access to dependency graph options from Modulr.graph.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobie committed Apr 30, 2010
1 parent b53a2f3 commit 9a47dd8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/modulr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9a47dd8

Please sign in to comment.