Sha256: b358f1dafd001881c19fea370542444b9409aa94337251ac2dabe08fa3c4479b
Contents?: true
Size: 641 Bytes
Versions: 6
Compression:
Stored size: 641 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 < Mechanize::Error attr_reader :response_code attr_reader :page def initialize(page) @page = page @response_code = page.code.to_s end def to_s "#{@response_code} => #{Net::HTTPResponse::CODE_TO_OBJ[@response_code]}" end def inspect; to_s; end end end
Version data entries
6 entries across 6 versions & 3 rubygems