Ruby Loop over file di folder

::Dir.each_child('/path/to/dir') do |filename|
  puts filename
end
Mateusz Drewniak