Sha256: 265489c75445ea9de1173c73c22d3b0f25e93a0c2fd977c2272910dcabb82bc0
Contents?: true
Size: 813 Bytes
Versions: 1
Compression:
Stored size: 813 Bytes
Contents
module RestMan # :include: _doc/lib/restman/exception.rdoc class Exception < RuntimeError attr_accessor :response attr_accessor :original_exception attr_writer :message def initialize response = nil, initial_response_code = nil @response = response @message = nil @initial_response_code = initial_response_code end def http_code # return integer for compatibility if @response @response.code.to_i else @initial_response_code end end def http_headers @response.headers if @response end def http_body @response.body if @response end def to_s message end def message @message || default_message end def default_message self.class.name end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rest-man-1.1.0 | lib/restman/exception.rb |