class Protip::Error

Attributes

request[R]
response[R]

Public Class Methods

new(request, response) click to toggle source
Calls superclass method
# File lib/protip/error.rb, line 8
    def initialize(request, response)
      @request = request
      @response = response

      msg = <<-MSG
Received HTTP #{response.code} from #{request.uri}. Response:
#{response.body}
      MSG
      super(msg)
    end

Public Instance Methods

inspect() click to toggle source
# File lib/protip/error.rb, line 19
def inspect
  "[#{self.class}] #{request.uri} -> code #{response.code}"
end