class Grape::Util::MediaType
def parse(media_type)
def parse(media_type) return if media_type.blank? type, subtype = media_type.split('/', 2) return if type.blank? || subtype.blank? new(type: type, subtype: subtype) end
def parse(media_type) return if media_type.blank? type, subtype = media_type.split('/', 2) return if type.blank? || subtype.blank? new(type: type, subtype: subtype) end