Exception: RestClient::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- RestClient::ApiError
- Defined in:
- lib/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.
16 17 18 19 |
# File 'lib/rest_client/api_error.rb', line 16 def initialize(response) @response = response super(response.) end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/rest_client/api_error.rb', line 5 def response @response end |
Class Method Details
.[](code) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/rest_client/api_error.rb', line 7 def self.[](code) case code when 404 NotFoundError else ApiError end end |