Exception: JsChat::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- JsChat::Error
- Defined in:
- lib/jschat/errors.rb
Direct Known Subclasses
JsChat::Errors::Flooding, JsChat::Errors::InvalidCookie, JsChat::Errors::InvalidName, JsChat::Errors::MessageTooLong
Instance Method Summary collapse
-
#initialize(code_key, message) ⇒ Error
constructor
A new instance of Error.
-
#to_json(*a) ⇒ Object
Note: This shouldn’t really include ‘display’ directives.
Constructor Details
Instance Method Details
#to_json(*a) ⇒ Object
Note: This shouldn’t really include ‘display’ directives
9 10 11 |
# File 'lib/jschat/errors.rb', line 9 def to_json(*a) { 'display' => 'error', 'error' => { 'message' => @message, 'code' => @code } }.to_json(*a) end |