Method: MIME::Type.simplified
- Defined in:
- lib/mime/type.rb
.simplified(content_type, remove_x_prefix: false) ⇒ Object
MIME media types are case-insensitive, but are typically presented in a case-preserving format in the type registry. This method converts content_type to lowercase.
In previous versions of mime-types, this would also remove any extension prefix (x-). This is no longer default behaviour, but may be provided by providing a truth value to remove_x_prefix.
623 624 625 |
# File 'lib/mime/type.rb', line 623 def simplified(content_type, remove_x_prefix: false) simplify_matchdata(match(content_type), remove_x_prefix) end |