Class: DebugTimer::NodePrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/debug_timer/node_printer.rb

Instance Method Summary collapse

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

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