Class: RubyProf::CallTreeTextPrinter::IndentedIo
- Inherits:
-
Object
- Object
- RubyProf::CallTreeTextPrinter::IndentedIo
- Defined in:
- lib/ruby-prof/call_tree/text_printer.rb
Instance Method Summary collapse
- #<<(text) ⇒ Object
-
#initialize(io, indent) ⇒ IndentedIo
constructor
A new instance of IndentedIo.
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 |