Method: Protip::Error#initialize
- Defined in:
- lib/protip/error.rb
#initialize(request, response) ⇒ Error
Returns a new instance of Error.
8 9 10 11 12 13 14 15 16 17 |
# 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 |