Exception: Tosuto::API::Error
- Extended by:
- Forwardable
- Defined in:
- lib/tosuto/api.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(message = nil, response:) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message = nil, response:) ⇒ Error
Returns a new instance of Error.
15 16 17 18 19 |
# File 'lib/tosuto/api.rb', line 15 def initialize( = nil, response:) @response = response @message = || [response.code, response.].join(" ") super(@message) end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
12 13 14 |
# File 'lib/tosuto/api.rb', line 12 def response @response end |