Class: Spoom::LSP::Diagnostic
- Inherits:
-
T::Struct
- Object
- T::Struct
- Spoom::LSP::Diagnostic
- Extended by:
- T::Sig
- Includes:
- PrintableSymbol
- Defined in:
- lib/spoom/sorbet/lsp/structures.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_json(json) ⇒ Object
168 169 170 171 172 173 174 175 |
# File 'lib/spoom/sorbet/lsp/structures.rb', line 168 def self.from_json(json) Diagnostic.new( range: Range.from_json(json['range']), code: json['code'].to_i, message: json['message'], informations: json['relatedInformation'] ) end |
Instance Method Details
#accept_printer(printer) ⇒ Object
178 179 180 |
# File 'lib/spoom/sorbet/lsp/structures.rb', line 178 def accept_printer(printer) printer.print(to_s) end |
#to_s ⇒ Object
183 184 185 |
# File 'lib/spoom/sorbet/lsp/structures.rb', line 183 def to_s "Error: #{} (#{code})." end |