Sha256: c0c8427e23e2fd34b9640c2e777285f9fc288e48bdd051d44a4bd29b6bfe0101

Contents?: true

Size: 430 Bytes

Versions: 8

Compression:

Stored size: 430 Bytes

Contents

# -*- coding: utf-8 -*-

cwd = File.expand_path( File.join( File.dirname(__FILE__), "..", "..", "lib" ) )
$:.unshift(cwd) unless $:.include?(cwd)
require 'treevisitor'
include TreeRb

class MyVisitor < BasicTreeNodeVisitor
  def visit_leaf( pathname )
    puts pathname
  end
end

dtw = DirTreeWalker.new( File.join(File.dirname(__FILE__), "..", ".." ) )
dtw.match "leaf_node.rb"
dtw.match "abs_node.rb"
dtw.run( MyVisitor.new )

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tree.rb-0.3.8 examples/directory_walker/find_files.rb
tree.rb-0.3.7 examples/directory_walker/find_files.rb
tree.rb-0.3.6 examples/directory_walker/find_files.rb
tree.rb-0.3.5 examples/directory_walker/find_files.rb
tree.rb-0.3.4 examples/directory_walker/find_files.rb
tree.rb-0.3.3 examples/directory_walker/find_files.rb
tree.rb-0.3.2 examples/directory_walker/find_files.rb
tree.rb-0.3.1 examples/directory_walker/find_files.rb