Exception: Semaph::Client::RequestException

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/semaph/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, response) ⇒ RequestException

Returns a new instance of RequestException.



10
11
12
13
14
# File 'lib/semaph/client.rb', line 10

def initialize(url, response)
  @url = url
  @response = response
  super("http response #{response.status} received for #{url}:\n#{response.body}")
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



8
9
10
# File 'lib/semaph/client.rb', line 8

def response
  @response
end

#urlObject (readonly)

Returns the value of attribute url.



8
9
10
# File 'lib/semaph/client.rb', line 8

def url
  @url
end