main.rb
##
# Pretty print method from The Odin Project lesson
Pretty print method from The Odin Project lesson
Pretty print method from The Odin Project lesson
def pretty_print(node = @root, prefix = '', is_left = true)
  pretty_print(node.right, "#{prefix}#{is_left ? '│   ' : '    '}", false) if node.right
  puts "#{prefix}#{is_left ? '└── ' : '┌── '}#{node.data}"
  pretty_print(node.left, "#{prefix}#{is_left ? '    ' : '│   '}", true) if node.left
end
def pretty_print ( node = @root , prefix = '' , is_left = true ) pretty_print ( node . right , "#{prefix}#{is_left ? '│   ' : '    '}",  f lse)  i  n de.r i ght puts "#{prefix}#{is_left ? '└── ' : '┌── '}#{node.data}" pretty_print ( node . left , "#{prefix}#{is_left ? '    ' : '│   '}",  t ue)  i  n de.l e ft end
Pretty print method from The Odin Project lesson
Pretty print method from The Odin Project lesson
node
<not_specific>
prefix
<not_specific>
is_left
<not_specific>