class method
self.fetch
Ruby on Rails 6.0.6
Since v4.0.13Signature
self.fetch(type)
No documentation comment.
Parameters
-
typereq
Source
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 43
def fetch(type)
return type if type.is_a?(Type)
EXTENSION_LOOKUP.fetch(type.to_s) { |k| yield k }
end
Defined in actionpack/lib/action_dispatch/http/mime_type.rb line 43
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Mime