Sha256: 18198ab02b6aa4087acd1e2dc1e82bd16ebd510725d284ec7bc05b5a838fa111

Contents?: true

Size: 608 Bytes

Versions: 3

Compression:

Stored size: 608 Bytes

Contents

module Utils
  module Asset

    class << self

      # Return true if the request is an asset returned by the server
      # by matching the extension.
      #
      # @return [Boolean]
      #
      # @api public
      def match(path)
        !(path !~ /\.(?:p?jpe?g?|png|gif|bmp|webp|tiff|ico|
                        avi|wmv|flv|mpe?g?|mp4|
                        wav|mp3|ogg|
                        font|eot|ttf|woff|svg|
                        js|css|te?xt|yaml|zip|xml|rss|pdf|csv|htc|msg|swf|
                        docx?|dotx?|xla|xlsx?|xltx?|potx?|pptx?|mdbx?)$/xi)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
four_o_four-0.0.4 lib/utils/asset.rb
four_o_four-0.0.3 lib/utils/asset.rb
four_o_four-0.0.2 lib/utils/asset.rb