instance method
match?
Ruby on Rails 8.0.4
Since v6.1.7.10Signature
match?(mime_type)
No documentation comment.
Parameters
-
mime_typereq
Source
# 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
Defined in actionpack/lib/action_dispatch/http/mime_type.rb line 317
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Mime::Type