Class: DebugTimer::NodePrinter
- Inherits:
-
Object
- Object
- DebugTimer::NodePrinter
- Defined in:
- lib/debug_timer/node_printer.rb
Instance Method Summary collapse
-
#initialize(node) ⇒ NodePrinter
constructor
A new instance of NodePrinter.
-
#print(depth) ⇒ Object
Should return a string of the printed.
Constructor Details
#initialize(node) ⇒ NodePrinter
Returns a new instance of NodePrinter.
3 4 5 |
# File 'lib/debug_timer/node_printer.rb', line 3 def initialize(node) @node = node end |
Instance Method Details
#print(depth) ⇒ Object
Should return a string of the printed
8 9 10 11 |
# File 'lib/debug_timer/node_printer.rb', line 8 def print(depth) spaces = " ".freeze * depth "#{left_stats} #{spaces} └── #{@node.name}" end |