Sha256: 0763a422a07f3eb46a98ad49737231d1d79b05bacf9d361c501640102fc2f90a
Contents?: true
Size: 688 Bytes
Versions: 24
Compression:
Stored size: 688 Bytes
Contents
module WWW class Mechanize # =Synopsis # This error is thrown when Mechanize encounters a response code it does # not know how to handle. Currently, this exception will be thrown # if Mechanize encounters response codes other than 200, 301, or 302. # Any other response code is up to the user to handle. class ResponseCodeError < RuntimeError attr_reader :response_code attr_reader :page def initialize(page) @page = page @response_code = page.code end def to_s "#{response_code} => #{Net::HTTPResponse::CODE_TO_OBJ[response_code]}" end def inspect; to_s; end end end end
Version data entries
24 entries across 24 versions & 5 rubygems