Skip to content

Instantly share code, notes, and snippets.

@codingjester
Created April 2, 2014 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codingjester/9936732 to your computer and use it in GitHub Desktop.
Save codingjester/9936732 to your computer and use it in GitHub Desktop.
Example File globbing for the path you want
def job_files(path=".")
Dir.glob("#{path}/**/*").select { |path| File.file?(path) }
end
puts job_files("ok")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment