method

match?

v7.2.3 - Show latest stable - Class: Mime::Type
match?(mime_type)
public

No documentation available.

# File actionpack/lib/action_dispatch/http/mime_type.rb, line 317
    def match?(mime_type)
      return false unless mime_type
      regexp = Regexp.new(Regexp.quote(mime_type.to_s))
      @synonyms.any? { |synonym| synonym.to_s.match?(regexp) } || @string.match?(regexp)
    end