Exception: Pocus::UnexpectedHttpResponse

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/pocus/session.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ UnexpectedHttpResponse

Returns a new instance of UnexpectedHttpResponse.



11
12
13
14
# File 'lib/pocus/session.rb', line 11

def initialize(response)
  @response = response
  super "Unexpected response [#{response.code}] #{response.body}"
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



10
11
12
# File 'lib/pocus/session.rb', line 10

def response
  @response
end