Exception: Spoom::LSP::Error::Diagnostics
- Inherits:
-
Spoom::LSP::Error
- Object
- StandardError
- Error
- Spoom::LSP::Error
- Spoom::LSP::Error::Diagnostics
- Defined in:
- lib/spoom/sorbet/lsp/errors.rb
Instance Attribute Summary collapse
-
#diagnostics ⇒ Object
readonly
: Array.
-
#uri ⇒ Object
readonly
: String.
Class Method Summary collapse
-
.from_json(json) ⇒ Object
: (Hash[untyped, untyped] json) -> Diagnostics.
Instance Method Summary collapse
-
#initialize(uri, diagnostics) ⇒ Diagnostics
constructor
: (String uri, Array diagnostics) -> void.
Constructor Details
#initialize(uri, diagnostics) ⇒ Diagnostics
: (String uri, Array diagnostics) -> void
28 29 30 31 32 |
# File 'lib/spoom/sorbet/lsp/errors.rb', line 28 def initialize(uri, diagnostics) @uri = uri @diagnostics = diagnostics super() end |
Instance Attribute Details
#diagnostics ⇒ Object (readonly)
: Array
15 16 17 |
# File 'lib/spoom/sorbet/lsp/errors.rb', line 15 def diagnostics @diagnostics end |
#uri ⇒ Object (readonly)
: String
12 13 14 |
# File 'lib/spoom/sorbet/lsp/errors.rb', line 12 def uri @uri end |
Class Method Details
.from_json(json) ⇒ Object
: (Hash[untyped, untyped] json) -> Diagnostics
19 20 21 22 23 24 |
# File 'lib/spoom/sorbet/lsp/errors.rb', line 19 def from_json(json) Diagnostics.new( json["uri"], json["diagnostics"].map { |d| Diagnostic.from_json(d) }, ) end |