Exception: Spoom::LSP::ResponseError
- Extended by:
- T::Sig
- Defined in:
- lib/spoom/sorbet/lsp/errors.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code, message, data) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(code, message, data) ⇒ ResponseError
Returns a new instance of ResponseError.
63 64 65 66 67 |
# File 'lib/spoom/sorbet/lsp/errors.rb', line 63 def initialize(code, , data) super() @code = code @data = data end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
44 45 46 |
# File 'lib/spoom/sorbet/lsp/errors.rb', line 44 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
47 48 49 |
# File 'lib/spoom/sorbet/lsp/errors.rb', line 47 def data @data end |
Class Method Details
.from_json(json) ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/spoom/sorbet/lsp/errors.rb', line 53 def from_json(json) ResponseError.new( json["code"], json["message"], json["data"], ) end |