Class: RubyProf::CallTreeTextPrinter

Inherits:
CallTreeAbstractPrinter show all
Defined in:
lib/ruby-prof/call_tree/text_printer.rb

Defined Under Namespace

Classes: IndentedIo

Instance Method Summary collapse

Methods inherited from CallTreeAbstractPrinter

#initialize

Constructor Details

This class inherits a constructor from RubyProf::CallTreeAbstractPrinter

Instance Method Details

#format_method(method) ⇒ Object



13
14
15
# File 'lib/ruby-prof/call_tree/text_printer.rb', line 13

def format_method(method)
  "#{method.klass}::#{method.method}, #{method.time}, #{method.call_count}\n"
end


4
5
6
7
# File 'lib/ruby-prof/call_tree/text_printer.rb', line 4

def print(io)
  io << "<main>\n"
  super(io) 
end


9
10
11
# File 'lib/ruby-prof/call_tree/text_printer.rb', line 9

def print_methods(io, methods, parent_time=nil)
  super(IndentedIo.new(io, 2), methods, parent_time)
end