Sha256: b096d2d5bd44601032808a61c05da371614bb379dc740da79ab3d6bdb8509e78

Contents?: true

Size: 647 Bytes

Versions: 4

Compression:

Stored size: 647 Bytes

Contents

# -*- encoding: utf-8 -*-

module Ackr

  # All 'find a file' relatives.
  module Finder

    # Public: Get all files to look for.
    #
    # Files of interest are those who are
    #   + not directory
    #   + not binary
    #   + not hidden
    #
    # Returns an Enumerator of String filename.
    def self.all_files
      Dir.glob('**/*').each do |file|
        next if (File.directory?(file) || Ackr::binary?(file))
        next if EXCLUDE_DIRS.any? do |dir|
          file.start_with?(dir + File::Separator) || 
            file.include?(File::Separator + dir + File::Separator)
        end
        yield(file)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ackr-0.2.4 lib/ackr/finder.rb
ackr-0.2.3 lib/ackr/finder.rb
ackr-0.2.2 lib/ackr/finder.rb
ackr-0.2 lib/ackr/finder.rb