Sha256: 86db8a7fed5f0f4fbc2267ab1d9f6b538e4adc1bc1a4e612beb3bcf492a63bd5

Contents?: true

Size: 370 Bytes

Versions: 6

Compression:

Stored size: 370 Bytes

Contents

class Dir
  # get only folder list form a folder
  def self.folders dir
    dir = dir.to_s

    Dir
      .entries(dir)
      .reject { |el| ['.', '..'].include?(el) }
      .select { |el| File.directory?([dir, el].join('/')) }
  end
end

class Pathname
  # Lux.fw_root.join('plugins').folders do |folder| ...
  def folders &block
    Dir.folders(to_s, &block)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lux-fw-0.5.37 ./lib/overload/dir.rb
lux-fw-0.5.36 ./lib/overload/dir.rb
lux-fw-0.5.35 ./lib/overload/dir.rb
lux-fw-0.5.34 ./lib/overload/dir.rb
lux-fw-0.5.33 ./lib/overload/dir.rb
lux-fw-0.5.32 ./lib/overload/dir.rb