Class: RubyProf::CallTreeTextPrinter::IndentedIo

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

Instance Method Summary collapse

Constructor Details

#initialize(io, indent) ⇒ IndentedIo

Returns a new instance of IndentedIo.



18
19
20
21
# File 'lib/ruby-prof/call_tree/text_printer.rb', line 18

def initialize(io, indent)
  @io = io
  @indent = Array.new(indent, ' ').join
end

Instance Method Details

#<<(text) ⇒ Object



23
24
25
# File 'lib/ruby-prof/call_tree/text_printer.rb', line 23

def <<(text)
  @io << "#{@indent}#{text}"
end