Sha256: 2f24a0aaa5c8c495c35c613c54a7b2608643fc41da86748c718614791725425a

Contents?: true

Size: 398 Bytes

Versions: 1

Compression:

Stored size: 398 Bytes

Contents

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

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

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

dtw = DirTreeWalker.new( ".." )
dtw.match "leaf_node.rb"
dtw.match "abs_node.rb"
dtw.run( MyVisitor.new )

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
treevisitor-0.1.6 examples/directory_walker/find_files.rb