Sha256: 9e673432dd1002f64bd6270ae52517cb2bb091a148735f9adc6f58e9c0774292
Contents?: true
Size: 581 Bytes
Versions: 13
Compression:
Stored size: 581 Bytes
Contents
#!/usr/bin/env ruby -ws $o ||= false $d ||= false type = ARGV.shift unless type then require "rubygems" hits = Gem.find_files("*_analyzer.rb").map { |s| File.basename s, "_analyzer.rb" } - %w(dep) abort "#{File.basename $0}: Need a type: #{hits.join(", ")}" end require "#{type}_analyzer" name = "#{type.capitalize}Analyzer" klass = Object.const_get name analyzer = klass.new graph = analyzer.run huge = graph.nodes.size + graph.edges.size > 500 ext = $d ? nil : huge ? "pdf" : "png" graph.save name, ext system "open #{name}.#{ext || "dot"}" if $o
Version data entries
13 entries across 13 versions & 1 rubygems