Sha256: 02a42dbe3feb14ed24a8be195eec6e681b1855326af968171c645ec330edf73e
Contents?: true
Size: 630 Bytes
Versions: 5
Compression:
Stored size: 630 Bytes
Contents
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
Version data entries
5 entries across 5 versions & 4 rubygems