Sha256: ad1a6cbdfa70b6f99fb1d6cda5440c7d8ae0f94c71159c01e5579c0a55f6d9a5

Contents?: true

Size: 595 Bytes

Versions: 3

Compression:

Stored size: 595 Bytes

Contents

module Sprockets
  module Legacy
    private
      # Deprecated: Seriously.
      def matches_filter(filters, logical_path, filename)
        return true if filters.empty?

        filters.any? do |filter|
          if filter.is_a?(Regexp)
            filter.match(logical_path)
          elsif filter.respond_to?(:call)
            if filter.arity == 1
              filter.call(logical_path)
            else
              filter.call(logical_path, filename.to_s)
            end
          else
            File.fnmatch(filter.to_s, logical_path)
          end
        end
      end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sprockets-3.0.0.beta.3 lib/sprockets/legacy.rb
sprockets-3.0.0.beta.2 lib/sprockets/legacy.rb
sprockets-3.0.0.beta.1 lib/sprockets/legacy.rb