mime_split()
public
Splits the type attribute into an array, e.g. [“text”, “xml”]
Show source
def mime_split
media_type = subtype = nil
if /\A\s*([a-z]+)\/([a-z\+]+)\s*(?:;.*)?\z/ =~ @type.to_s
media_type = $1.downcase
subtype = $2.downcase
end
[media_type, subtype]
end