Class: SecretHub::APIError
- Inherits:
-
SecretHubError
- Object
- SecretHub::APIError
- Defined in:
- lib/secret_hub/exceptions.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(response) ⇒ APIError
Returns a new instance of APIError.
8 9 10 11 |
# File 'lib/secret_hub/exceptions.rb', line 8 def initialize(response) @response = response super "[#{response.code}] #{response.body}" end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
6 7 8 |
# File 'lib/secret_hub/exceptions.rb', line 6 def response @response end |