Exception: CatalogAPI::Request::Error
- Inherits:
-
StandardError
- Object
- StandardError
- CatalogAPI::Request::Error
- Defined in:
- lib/catalogapi/request.rb
Overview
CatalogAPI Error
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#code ⇒ Object
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(response) ⇒ Error
constructor
A new instance of Error.
- #message ⇒ Object
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
44 45 46 47 |
# File 'lib/catalogapi/request.rb', line 44 def initialize(response) @body = response.body @code = response.code end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
43 44 45 |
# File 'lib/catalogapi/request.rb', line 43 def body @body end |
#code ⇒ Object
Returns the value of attribute code.
43 44 45 |
# File 'lib/catalogapi/request.rb', line 43 def code @code end |
Instance Method Details
#message ⇒ Object
49 50 51 |
# File 'lib/catalogapi/request.rb', line 49 def "#{code} #{body}" end |