Sha256: 26c9936349b9e3f48e599e98567a746ddb476a107355ea61e2dabbc4f5597f02
Contents?: true
Size: 438 Bytes
Versions: 2
Compression:
Stored size: 438 Bytes
Contents
# -*- coding: utf-8 -*- cwd = File.expand_path( File.join( File.dirname(__FILE__), "..", "..", "lib" ) ) $:.unshift(cwd) unless $:.include?(cwd) require 'tree_rb' include TreeRb class MyVisitor < BasicTreeNodeVisitor def visit_leaf( pathname ) puts "found: #{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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tree.rb-0.3.10 | examples/ruby_examples/find_files.rb |
tree.rb-0.3.9 | examples/ruby_examples/find_files.rb |