Exception: STP::Errors::STPError
- Inherits:
-
StandardError
- Object
- StandardError
- STP::Errors::STPError
- Defined in:
- lib/stp/errors/stp_error.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(code = nil, message = nil) ⇒ STPError
constructor
A new instance of STPError.
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(code = nil, message = nil) ⇒ STPError
Returns a new instance of STPError.
4 5 6 7 |
# File 'lib/stp/errors/stp_error.rb', line 4 def initialize(code = nil, = nil) @code = code @message = end |
Instance Method Details
#to_h ⇒ Object
9 10 11 |
# File 'lib/stp/errors/stp_error.rb', line 9 def to_h { code: @code, message: @message } end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/stp/errors/stp_error.rb', line 13 def to_s to_h.to_s end |