Class: LanguageServer::Protocol::Interface::RelatedUnchangedDocumentDiagnosticReport
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::RelatedUnchangedDocumentDiagnosticReport
- Defined in:
- lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb
Overview
An unchanged diagnostic report with a set of related documents.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(kind:, result_id:, related_documents: nil) ⇒ RelatedUnchangedDocumentDiagnosticReport
constructor
A new instance of RelatedUnchangedDocumentDiagnosticReport.
-
#kind ⇒ any
A document diagnostic report indicating no changes to the last result.
-
#related_documents ⇒ { [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }
Diagnostics of related documents.
-
#result_id ⇒ string
A result id which will be sent on the next diagnostic request for the same document.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(kind:, result_id:, related_documents: nil) ⇒ RelatedUnchangedDocumentDiagnosticReport
Returns a new instance of RelatedUnchangedDocumentDiagnosticReport.
8 9 10 11 12 13 14 15 16 |
# File 'lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb', line 8 def initialize(kind:, result_id:, related_documents: nil) @attributes = {} @attributes[:kind] = kind @attributes[:resultId] = result_id @attributes[:relatedDocuments] = if @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
50 51 52 |
# File 'lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb', line 50 def attributes @attributes end |
Instance Method Details
#kind ⇒ any
A document diagnostic report indicating no changes to the last result. A server can only return ‘unchanged` if result ids are provided.
25 26 27 |
# File 'lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb', line 25 def kind attributes.fetch(:kind) end |
#related_documents ⇒ { [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }
Diagnostics of related documents. This information is useful in programming languages where code in a file A can generate diagnostics in a file B which A depends on. An example of such a language is C/C++ where marco definitions in a file a.cpp and result in errors in a header file b.hpp.
46 47 48 |
# File 'lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb', line 46 def attributes.fetch(:relatedDocuments) end |
#result_id ⇒ string
A result id which will be sent on the next diagnostic request for the same document.
34 35 36 |
# File 'lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb', line 34 def result_id attributes.fetch(:resultId) end |
#to_hash ⇒ Object
52 53 54 |
# File 'lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb', line 52 def to_hash attributes end |
#to_json(*args) ⇒ Object
56 57 58 |
# File 'lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb', line 56 def to_json(*args) to_hash.to_json(*args) end |