Exception: Baloo::HTTPError

Inherits:
Error
  • Object
show all
Defined in:
lib/baloo/error.rb

Constant Summary collapse

MessageFormat =
"%s %s => %s \n %s"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ HTTPError

Returns a new instance of HTTPError.



10
11
12
13
# File 'lib/baloo/error.rb', line 10

def initialize(response)
  @response = response
  super sprintf(MessageFormat, response.request.http_method, response.request.uri, response.response.class, response.body)
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



7
8
9
# File 'lib/baloo/error.rb', line 7

def response
  @response
end