Sha256: 9045707d102bc45d2287c1f119e8a687ddbf600b17a833f670f0e9a12f361c01

Contents?: true

Size: 392 Bytes

Versions: 3

Compression:

Stored size: 392 Bytes

Contents

class Dir

  def self.glob_with_ignore_file(ignore_file, base_dir, *glob_args, &block)
    filter = DirGlobIgnore::IgnoreFileLists.new base_dir
    filter.ignore_file_name = ignore_file
    filter.load_ignore_files
    Dir.glob(*glob_args).reject do |file|
      if filter.ignore_file? file
        true
      else
        yield file if block_given?
        false
      end
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dir_glob_ignore-0.3.0 lib/dir_glob_ignore/dir_patch.rb
dir_glob_ignore-0.2.3 lib/dir_glob_ignore/dir_patch.rb
dir_glob_ignore-0.2.2 lib/dir_glob_ignore/dir_patch.rb