Often times I find myself working with directories in my Ruby code. I find this loop to be very useful.
Compile an array of directories in current working directory
Dir.glob('*').select do |f|
File.directory? f
end
Often times I find myself working with directories in my Ruby code. I find this loop to be very useful.
Compile an array of directories in current working directory
Dir.glob('*').select do |f|
File.directory? f
end