class method
self.lookup
Ruby on Rails 7.1.6
Since v2.2.3Signature
self.lookup(string)
No documentation comment.
Parameters
-
stringreq
Source
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 164
def lookup(string)
return LOOKUP[string] if LOOKUP.key?(string)
# fallback to the media-type without parameters if it was not found
string = string.split(";", 2)[0]&.rstrip
LOOKUP[string] || Type.new(string)
end
Defined in actionpack/lib/action_dispatch/http/mime_type.rb line 164
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Mime::Type