asset/bundle/gems/mechanize-2.7.3/lib/mechanize/pluggable_parsers.rb
def parser content_type
    return default unless content_type

    parser = @parsers[content_type]

    return parser if parser

    mime_type = MIME::Type.new content_type

    parser = @parsers[mime_type.to_s] ||
             @parsers[mime_type.simplified] ||
             @parsers[mime_type.media_type] ||
             default
  rescue MIME::Type::InvalidContentType
    default
  end
##
# Returns the parser registered for the given +content_type+
Returns the parser registered for the given +content_type+
Returns the parser registered for the given + content_type +
def parser content_type
    return default unless content_type
    parser = @parsers[content_type]
    return parser if parser
    mime_type = MIME::Type.new content_type
    parser = @parsers[mime_type.to_s] ||
             @parsers[mime_type.simplified] ||
             @parsers[mime_type.media_type] ||
             default
  rescue MIME::Type::InvalidContentType
    default
  end
def parser content_type return default unless content_type parser = @parsers [ content_type ] return parser if parser mime_type = MIME :: Type . new content_type parser = @parsers [ mime_type . to_s ] || @parsers [ mime_type . simplified ] || @parsers [ mime_type . media_type ] || default rescue MIME :: Type :: InvalidContentType default end
Returns the parser registered for the given +content_type+
Returns the parser registered for the given + content_type +
content_type