Created
June 21, 2010 11:54
-
-
Save dominiek/446746 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def loop_dir(dir) | |
Find.find(dir) do |path| | |
next if path == '.' | |
yield(path) unless ignore_path?(path) | |
end | |
end | |
def ignore_path?(path) | |
@ignored_path_regexes.detect { |regex| File.basename(path).match(regex) != nil } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment