Exception: BaseApi::Error
- Inherits:
-
StandardError
- Object
- StandardError
- BaseApi::Error
- Defined in:
- lib/base_api.rb,
lib/base_api/error.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(response) ⇒ Error
constructor
A new instance of Error.
- #response_body ⇒ Object
- #response_headers ⇒ Object
- #response_status ⇒ Object
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
3 4 5 6 |
# File 'lib/base_api/error.rb', line 3 def initialize(response) @response = response super() end |
Instance Method Details
#response_body ⇒ Object
16 17 18 |
# File 'lib/base_api/error.rb', line 16 def response_body @response.parsed_response end |
#response_headers ⇒ Object
12 13 14 |
# File 'lib/base_api/error.rb', line 12 def response_headers @response.headers end |
#response_status ⇒ Object
8 9 10 |
# File 'lib/base_api/error.rb', line 8 def response_status @response.code end |