class method
self.fetch
Ruby on Rails 4.1.16
Since v4.0.13Signature
self.fetch(type)
No documentation comment.
Parameters
-
typereq
Source
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 34
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 34
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Mime