Class: RequireProfiler::Printer::Text
- Defined in:
- lib/require_profiler/printer/text.rb
Constant Summary collapse
- PAD =
" "
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from RequireProfiler::Printer::Base
Instance Method Details
#flush(node, indent: 0) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/require_profiler/printer/text.rb', line 8 def flush(node, indent: 0) path = node.path.sub(prefix_stripper, "") output << "#{PAD * indent}#{path} — #{time_to_duration(node.time)}\n" node.children.each { flush(_1, indent: indent + 1) } output.flush end |