3 4 5 6 7 8 9 10 11 12 13 14 15
# File 'lib/githubbish_assets/lister.rb', line 3 def self.[](root, ext) files = [] root.find do |path| if path.file? && path.extname == ext files << path elsif path.directory? && path.basename.to_s[0] == ?. Find.prune end end files.sort end