Class: TodoNext::Tree::Visitor::LeafMaker

Inherits:
Base
  • Object
show all
Defined in:
lib/todo_next/tree/visitor/leaf_maker.rb

Instance Method Summary collapse

Methods inherited from Base

#visit, #visit_children_of

Instance Method Details

#process_non_terminal_node(curr_node, level, parent) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/todo_next/tree/visitor/leaf_maker.rb', line 9

def process_non_terminal_node(curr_node, level, parent)
  if curr_node.has_children?
    visit_children_of(curr_node, level)
  else
    curr_node.make_me_a_leaf
  end
end

#process_terminal_node(curr_node, level, parent) ⇒ Object



6
7
# File 'lib/todo_next/tree/visitor/leaf_maker.rb', line 6

def process_terminal_node(curr_node, level, parent)
end