Exception: Spoom::LSP::Error::Diagnostics
- Inherits:
-
Spoom::LSP::Error
- Object
- StandardError
- Spoom::LSP::Error
- Spoom::LSP::Error::Diagnostics
- Extended by:
- T::Sig
- Defined in:
- lib/spoom/sorbet/lsp/errors.rb
Instance Attribute Summary collapse
-
#diagnostics ⇒ Object
readonly
Returns the value of attribute diagnostics.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(uri, diagnostics) ⇒ Diagnostics
constructor
A new instance of Diagnostics.
Constructor Details
#initialize(uri, diagnostics) ⇒ Diagnostics
Returns a new instance of Diagnostics.
32 33 34 35 36 |
# File 'lib/spoom/sorbet/lsp/errors.rb', line 32 def initialize(uri, diagnostics) @uri = uri @diagnostics = diagnostics super() end |
Instance Attribute Details
#diagnostics ⇒ Object (readonly)
Returns the value of attribute diagnostics.
17 18 19 |
# File 'lib/spoom/sorbet/lsp/errors.rb', line 17 def diagnostics @diagnostics end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
14 15 16 |
# File 'lib/spoom/sorbet/lsp/errors.rb', line 14 def uri @uri end |
Class Method Details
.from_json(json) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/spoom/sorbet/lsp/errors.rb', line 23 def from_json(json) Diagnostics.new( json["uri"], json["diagnostics"].map { |d| Diagnostic.from_json(d) }, ) end |