Class: TreeRb::PrintDirTreeVisitor

Inherits:
Object
  • Object
show all
Defined in:
lib/tree_rb/visitors/print_dir_tree_visitor.rb

Overview

Visitor for DirTreeWalker Prints the node at enter TODO: join this con PrintTreeNodeVisitor

Instance Method Summary collapse

Instance Method Details

#cannot_enter_node(tree_node, error) ⇒ Object

called when the tree node is not accessible or an exception is raise when the node is accessed



19
20
# File 'lib/tree_rb/visitors/print_dir_tree_visitor.rb', line 19

def cannot_enter_node( tree_node, error)
end

#enter_node(pathname) ⇒ Object

< BasicTreeNodeVisitor



9
10
11
# File 'lib/tree_rb/visitors/print_dir_tree_visitor.rb', line 9

def enter_node( pathname )
  puts pathname
end

#exit_node(pathname) ⇒ Object



13
14
# File 'lib/tree_rb/visitors/print_dir_tree_visitor.rb', line 13

def exit_node( pathname )
end

#visit_leaf(pathname) ⇒ Object



22
23
24
# File 'lib/tree_rb/visitors/print_dir_tree_visitor.rb', line 22

def visit_leaf( pathname )
  puts pathname
end