Exception: UnexpectedResponseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/text_tunnel/client.rb

Overview

Interface is compatible with RestClient exception

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ UnexpectedResponseError

Returns a new instance of UnexpectedResponseError.



12
13
14
# File 'lib/text_tunnel/client.rb', line 12

def initialize(response)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



10
11
12
# File 'lib/text_tunnel/client.rb', line 10

def response
  @response
end

Instance Method Details

#http_bodyObject



20
21
22
# File 'lib/text_tunnel/client.rb', line 20

def http_body
  response.body
end

#http_codeObject



16
17
18
# File 'lib/text_tunnel/client.rb', line 16

def http_code
  response.code.to_i
end