Sha256: 7fb4c6f55a17c19425147a936179df4092085a37125109b1b337409c65461035
Contents?: true
Size: 1.02 KB
Versions: 11
Compression:
Stored size: 1.02 KB
Contents
module RubyProf class AbstractPrinter def initialize(result) @result = result @output = nil @options = {} end # Specify print options. # # options - Hash table # :min_percent - Number 0 to 100 that specifes the minimum # %self (the methods self time divided by the # overall total time) that a method must take # for it to be printed out in the report. # Default value is 0. # # :print_file - True or false. Specifies if a method's source # file should be printed. Default value if false. # def setup_options(options = {}) @options = options end def min_percent @options[:min_percent] || 0 end def print_file @options[:print_file] || false end def method_name(method) name = method.full_name if print_file name += " (#{method.source_file}:#{method.line}}" end name end end end
Version data entries
11 entries across 11 versions & 2 rubygems