Exception: Blockchain0x::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Blockchain0x::Error
- Defined in:
- lib/blockchain0x/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
Instance Method Summary collapse
-
#initialize(code:, message:, http_status: nil, request_id: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(code:, message:, http_status: nil, request_id: nil) ⇒ Error
Returns a new instance of Error.
24 25 26 27 28 29 |
# File 'lib/blockchain0x/errors.rb', line 24 def initialize(code:, message:, http_status: nil, request_id: nil) super("#{code}: #{}") @code = code @http_status = http_status @request_id = request_id end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
22 23 24 |
# File 'lib/blockchain0x/errors.rb', line 22 def code @code end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
22 23 24 |
# File 'lib/blockchain0x/errors.rb', line 22 def http_status @http_status end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
22 23 24 |
# File 'lib/blockchain0x/errors.rb', line 22 def request_id @request_id end |