- zenspider.com
- zenspider projects
- path_expander
PathExpander helps pre-process command-line arguments expanding directories into their constituent files. It further helps by providing additional mechanisms to make specifying subsets easier with path subtraction and allowing for command-line arguments to be saved in a file.
NOTE: this is NOT an options processor. It is a path processor (basically everything else besides options). It does provide a mechanism for pre-filtering cmdline options, but not with the intent of actually processing them in PathExpander. Use OptionParser to deal with options either before or after passing ARGV through PathExpander.
1 2 3 4 5 6 7 8 9 10 11 |
class MyPathExpander < PathExpander MY_GLOB = "**/*.rb" def initialize args = ARGV super args, MY_GLOB end end MyPathExpander.new(ARGV, my_glob).process.each do |f| # do something with each file end |
gem install path_expander
git clone git://github.com/seattlerb/path_expander