instance method
=~
Ruby on Rails 7.0.10
Since v2.3.18Signature
=~(mime_type)
No documentation comment.
Parameters
-
mime_typereq
Source
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 281
def =~(mime_type)
return false unless mime_type
regexp = Regexp.new(Regexp.quote(mime_type.to_s))
@synonyms.any? { |synonym| synonym.to_s =~ regexp } || @string =~ regexp
end
Defined in actionpack/lib/action_dispatch/http/mime_type.rb line 281
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Mime::Type