Sha256: 8588ac165996b3eac8baebc09d9a08b9a63ca601119b733fb86a6172a3ebb60b

Contents?: true

Size: 381 Bytes

Versions: 2

Compression:

Stored size: 381 Bytes

Contents

module Pidgin2Adium
  class FileFinder
    EXTENSIONS = %w(html htm txt)

    def initialize(directory)
      @directory = File.expand_path(directory)
    end

    def find
      Dir[glob]
    end

    private

    def glob
      File.join(@directory, "**/*.{#{comma_separated_extensions}}")
    end

    def comma_separated_extensions
      EXTENSIONS.join(",")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pidgin2adium-4.0.0.beta2 lib/pidgin2adium/file_finder.rb
pidgin2adium-4.0.0.beta1 lib/pidgin2adium/file_finder.rb