Exception: WCC::API::RestClient::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- WCC::API::RestClient::ApiError
- Defined in:
- lib/wcc/api/rest_client/api_error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(response) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(response) ⇒ ApiError
Returns a new instance of ApiError.
17 18 19 20 |
# File 'lib/wcc/api/rest_client/api_error.rb', line 17 def initialize(response) @response = response super(response.) end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
6 7 8 |
# File 'lib/wcc/api/rest_client/api_error.rb', line 6 def response @response end |
Class Method Details
.[](code) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/wcc/api/rest_client/api_error.rb', line 8 def self.[](code) case code when 404 NotFoundError else ApiError end end |