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