Skip to content

Instantly share code, notes, and snippets.

@webcoyote
Created February 5, 2013 21:13
Show Gist options
  • Save webcoyote/4717711 to your computer and use it in GitHub Desktop.
Save webcoyote/4717711 to your computer and use it in GitHub Desktop.
Ruby directory globbing
Dir.glob(
'**/*', File::FNM_DOTMATCH
).reject { |a| a =~ /\.{1,2}$/ }.each do |f|
puts f
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment