Exception: Walletone::ErrorResponse
- Inherits:
-
StandardError
- Object
- StandardError
- Walletone::ErrorResponse
- Defined in:
- lib/walletone/error_response.rb
Instance Method Summary collapse
-
#initialize(response) ⇒ ErrorResponse
constructor
A new instance of ErrorResponse.
- #message ⇒ Object
Constructor Details
#initialize(response) ⇒ ErrorResponse
Returns a new instance of ErrorResponse.
3 4 5 6 |
# File 'lib/walletone/error_response.rb', line 3 def initialize(response) fail 'Must be a Net::HTTPInternalServerError' unless response.is_a? Net::HTTPInternalServerError @response = response end |
Instance Method Details
#message ⇒ Object
8 9 10 |
# File 'lib/walletone/error_response.rb', line 8 def "[#{response.code}] #{response.body}" end |