Exception: UnexpectedResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- UnexpectedResponseError
- Defined in:
- lib/text_tunnel/client.rb
Overview
Interface is compatible with RestClient exception
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #http_body ⇒ Object
- #http_code ⇒ Object
-
#initialize(response) ⇒ UnexpectedResponseError
constructor
A new instance of UnexpectedResponseError.
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
#response ⇒ Object (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_body ⇒ Object
20 21 22 |
# File 'lib/text_tunnel/client.rb', line 20 def http_body response.body end |
#http_code ⇒ Object
16 17 18 |
# File 'lib/text_tunnel/client.rb', line 16 def http_code response.code.to_i end |