class Rdepend::Trace
Public Class Methods
base()
click to toggle source
# File lib/rdepend/trace.rb, line 49 def self.base File.basename($0) end
exec() { || ... }
click to toggle source
# File lib/rdepend/trace.rb, line 38 def self.exec(&block) self.init yield self.stop end
halt_with_message()
click to toggle source
# File lib/rdepend/trace.rb, line 61 def self.halt_with_message puts "⏳ Exiting, but writing an Ꝛdepend graph first, so please wait!" self.stop end
init(paths = [Dir.pwd])
click to toggle source
# File lib/rdepend/trace.rb, line 44 def self.init(paths = [Dir.pwd]) @paths = paths RubyProf.start end
stop()
click to toggle source
# File lib/rdepend/trace.rb, line 53 def self.stop result = RubyProf.stop result.eliminate_methods!(@paths) puts "Writing Ꝛdepend graph to rdepend/#{base}.dot.svg" Dir.mkdir('rdepend') unless Dir.exist?('rdepend') Rdepend::Printer.new(result).print("rdepend/#{base}.dot") end