Class: LanguageServer::Protocol::Interface::WorkspaceDocumentDiagnosticReport
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::WorkspaceDocumentDiagnosticReport
- Defined in:
- lib/language_server/protocol/interface/workspace_document_diagnostic_report.rb,
sig/language_server/protocol/interface/workspace_document_diagnostic_report.rbs
Overview
A workspace diagnostic document report.
Instance Attribute Summary collapse
- #attributes ⇒ Hash[Symbol, untyped] readonly
Instance Method Summary collapse
-
#initialize(uri:, version:, kind:, result_id: nil, items: nil) ⇒ WorkspaceDocumentDiagnosticReport
constructor
A new instance of WorkspaceDocumentDiagnosticReport.
-
#items ⇒ Diagnostic[]
The actual items.
-
#kind ⇒ "full" | "unchanged"
A full document diagnostic report.
-
#result_id ⇒ string
An optional result id.
- #to_hash ⇒ Hash[Symbol, untyped]
- #to_json(*args) ⇒ String
-
#uri ⇒ DocumentUri
The URI for which diagnostic information is reported.
-
#version ⇒ integer | nil
The version number for which the diagnostics are reported.
Constructor Details
#initialize(uri:, version:, kind:, result_id: nil, items: nil) ⇒ WorkspaceDocumentDiagnosticReport
Returns a new instance of WorkspaceDocumentDiagnosticReport.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/language_server/protocol/interface/workspace_document_diagnostic_report.rb', line 10 def initialize(uri:, version:, kind:, result_id: nil, items: nil) @attributes = {} @attributes[:uri] = uri @attributes[:version] = version @attributes[:kind] = kind @attributes[:resultId] = result_id if result_id @attributes[:items] = items if items @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Hash[Symbol, untyped] (readonly)
77 78 79 |
# File 'lib/language_server/protocol/interface/workspace_document_diagnostic_report.rb', line 77 def attributes @attributes end |
Instance Method Details
#items ⇒ Diagnostic[]
The actual items.
73 74 75 |
# File 'lib/language_server/protocol/interface/workspace_document_diagnostic_report.rb', line 73 def items attributes.fetch(:items) end |
#kind ⇒ "full" | "unchanged"
A full document diagnostic report.
--- OR ---
A document diagnostic report indicating
no changes to the last result. A server can
only return unchanged if result ids are
provided.
50 51 52 |
# File 'lib/language_server/protocol/interface/workspace_document_diagnostic_report.rb', line 50 def kind attributes.fetch(:kind) end |
#result_id ⇒ string
An optional result id. If provided it will be sent on the next diagnostic request for the same document.
--- OR ---
A result id which will be sent on the next diagnostic request for the same document.
65 66 67 |
# File 'lib/language_server/protocol/interface/workspace_document_diagnostic_report.rb', line 65 def result_id attributes.fetch(:resultId) end |
#to_hash ⇒ Hash[Symbol, untyped]
79 80 81 |
# File 'lib/language_server/protocol/interface/workspace_document_diagnostic_report.rb', line 79 def to_hash attributes end |
#to_json(*args) ⇒ String
83 84 85 |
# File 'lib/language_server/protocol/interface/workspace_document_diagnostic_report.rb', line 83 def to_json(*args) to_hash.to_json(*args) end |
#uri ⇒ DocumentUri
The URI for which diagnostic information is reported.
26 27 28 |
# File 'lib/language_server/protocol/interface/workspace_document_diagnostic_report.rb', line 26 def uri attributes.fetch(:uri) end |
#version ⇒ integer | nil
The version number for which the diagnostics are reported.
If the document is not marked as open null can be provided.
35 36 37 |
# File 'lib/language_server/protocol/interface/workspace_document_diagnostic_report.rb', line 35 def version attributes.fetch(:version) end |