Exception: Jimson::ServerError::Generic
- Inherits:
-
Exception
- Object
- Exception
- Jimson::ServerError::Generic
- Defined in:
- lib/jimson/server_error.rb
Direct Known Subclasses
ApplicationError, InternalError, InvalidParams, InvalidRequest, MethodNotFound, ParseError
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(code, message) ⇒ Generic
constructor
A new instance of Generic.
- #to_h ⇒ Object
Constructor Details
#initialize(code, message) ⇒ Generic
Returns a new instance of Generic.
6 7 8 9 10 |
# File 'lib/jimson/server_error.rb', line 6 def initialize(code, ) @code = code @message = super() end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
4 5 6 |
# File 'lib/jimson/server_error.rb', line 4 def code @code end |
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/jimson/server_error.rb', line 4 def @message end |
Instance Method Details
#to_h ⇒ Object
12 13 14 15 16 17 |
# File 'lib/jimson/server_error.rb', line 12 def to_h { 'code' => @code, 'message' => @message } end |