def match_content_types_for(content_types, type)
      content_types.detect do |content_type, _|
        content_type.is_a?(Regexp) ? type.match(content_type) : type == content_type
      end
    end
def match_content_types_for(content_types, type)
      content_types.detect do |content_type, _|
        content_type.is_a?(Regexp) ? type.match(content_type) : type == content_type
      end
    end
Private: matches content types for the given media type

 content_types - An array of the parsers or handlers options
 type          - The media type. gathered from the Rack::Request

 Returns The match from the parser/handler hash or nil