Class | RubyProf::AbstractPrinter |
In: |
lib/ruby-prof/abstract_printer.rb
|
Parent: | Object |
# File lib/ruby-prof/abstract_printer.rb, line 3 3: def initialize(result) 4: @result = result 5: @output = nil 6: @options = {} 7: end
# File lib/ruby-prof/abstract_printer.rb, line 33 33: def method_name(method) 34: name = method.full_name 35: if print_file 36: name += " (#{method.source_file}:#{method.line}}" 37: end 38: name 39: end
# File lib/ruby-prof/abstract_printer.rb, line 25 25: def min_percent 26: @options[:min_percent] || 0 27: end
# File lib/ruby-prof/abstract_printer.rb, line 29 29: def print_file 30: @options[:print_file] || false 31: 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.
# File lib/ruby-prof/abstract_printer.rb, line 21 21: def setup_options(options = {}) 22: @options = options 23: end