Is there a way to glob a directory in Ruby but exclude certain directories?
I know this is 4 years late but for anybody else that might run across this question you can exclude from Dir the same way you would exclude from Bash wildcards: Dir[“lib/{[!errors/]**/*,*}.rb”] Which will exclude any folder that starts with “errors” you could even omit the / and turn it into a wildcard of sorts … Read more