Module: Mime
| Relationships & Source Files | |
| Namespace Children | |
|
Classes:
| |
| Defined in: | actionpack/lib/action_dispatch/http/mime_type.rb |
Constant Summary
-
ALL =
# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 387
ALLisn't a real MIME type, so we don't register it for lookup with the other concrete types. It's a wildcard match that we use forrespond_tonegotiation internals.AllType.instance
-
EXTENSION_LOOKUP =
Internal use only
# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 62ActiveSupport::Deprecation::DeprecatedObjectProxy.new( # :nodoc: @lookup_by_extension, "Mime::EXTENSION_LOOKUP is deprecated. Use Mime.extensions to enumerate registered extensions, or Mime::Type.lookup_by_extension / Mime[...] to look one up.", ActionDispatch.deprecator, )
-
LOOKUP =
Internal use only
# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 57ActiveSupport::Deprecation::DeprecatedObjectProxy.new( # :nodoc: @lookup_by_string, "Mime::LOOKUP is deprecated. Use Mime::Type.lookup instead.", ActionDispatch.deprecator, )
-
SET =
Internal use only
# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 52ActiveSupport::Deprecation::DeprecatedObjectProxy.new( # :nodoc: @registry, "Mime::SET is deprecated. Use Mime.symbols to enumerate registered types, or Mime[...] / Mime::Type.lookup to look one up.", ActionDispatch.deprecator, )
Class Attribute Summary
- .lookup_by_extension readonly Internal use only
- .lookup_by_string readonly Internal use only
- .registry readonly Internal use only
Class Method Summary
- .[](type)
- .extensions
- .fetch(type, &block)
- .symbols
- .valid_symbols?(symbols) ⇒ Boolean Internal use only
Class Attribute Details
.lookup_by_extension (readonly)
This method is for internal use only.
[ GitHub ]
# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 69
attr_reader :registry, :lookup_by_string, :lookup_by_extension # :nodoc:
.lookup_by_string (readonly)
This method is for internal use only.
[ GitHub ]
# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 69
attr_reader :registry, :lookup_by_string, :lookup_by_extension # :nodoc:
.registry (readonly)
This method is for internal use only.
[ GitHub ]
# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 69
attr_reader :registry, :lookup_by_string, :lookup_by_extension # :nodoc:
Class Method Details
.[](type)
[ GitHub ]# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 71
def [](type) return type if type.is_a?(Type) Type.lookup_by_extension(type) end
.extensions
[ GitHub ]# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 80
def extensions @lookup_by_extension.keys end
.fetch(type, &block)
[ GitHub ]# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 88
def fetch(type, &block) return type if type.is_a?(Type) @lookup_by_extension.fetch(type.to_s, &block) end
.symbols
[ GitHub ]# File 'actionpack/lib/action_dispatch/http/mime_type.rb', line 76
def symbols @registry.symbols end
.valid_symbols?(symbols) ⇒ Boolean
This method is for internal use only.