Class: Dir

Inherits:
Object show all
Defined in:
lib/doh/core/dir.rb

Class Method Summary collapse

Class Method Details

.directories(path, include_dots = false) ⇒ Object



2
3
4
5
6
# File 'lib/doh/core/dir.rb', line 2

def self.directories(path, include_dots = false)
  entries(path).find_all do |entry|
    File.directory?(File.join(path, entry)) && (include_dots || entry[0,1] != '.')
  end
end