method

lookup

v7.2.3 - Show latest stable - Class: Mime::Type
lookup(string)
public

No documentation available.

# File actionpack/lib/action_dispatch/http/mime_type.rb, line 167
      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