Class: TodoNext::Tree::Visitor::ExampleNodesRemover

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

Instance Method Summary collapse

Methods inherited from Base

#process_non_terminal_node, #process_terminal_node, #visit_children_of

Instance Method Details

#visit(curr_node, level, parent) ⇒ Object

nodoc#



6
7
8
9
10
11
12
# File 'lib/todo_next/tree/visitor/example_remover_visitor.rb', line 6

def visit(curr_node, level, parent) #nodoc#
  if curr_node.example?
    remove_from_tree(curr_node)
  elsif curr_node.has_children?
    visit_children_of(curr_node, level)
  end
end