Class: LanguageServer::Protocol::Interface::RelatedFullDocumentDiagnosticReport
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::RelatedFullDocumentDiagnosticReport
- Defined in:
- lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb
Overview
A full 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: nil, items:, related_documents: nil) ⇒ RelatedFullDocumentDiagnosticReport
constructor
A new instance of RelatedFullDocumentDiagnosticReport.
-
#items ⇒ Diagnostic[]
The actual items.
-
#kind ⇒ any
A full document diagnostic report.
-
#related_documents ⇒ { [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }
Diagnostics of related documents.
-
#result_id ⇒ string
An optional result id.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(kind:, result_id: nil, items:, related_documents: nil) ⇒ RelatedFullDocumentDiagnosticReport
Returns a new instance of RelatedFullDocumentDiagnosticReport.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb', line 8 def initialize(kind:, result_id: nil, items:, related_documents: nil) @attributes = {} @attributes[:kind] = kind @attributes[:resultId] = result_id if result_id @attributes[:items] = items @attributes[:relatedDocuments] = if @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
57 58 59 |
# File 'lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb', line 57 def attributes @attributes end |
Instance Method Details
#items ⇒ Diagnostic[]
The actual items.
41 42 43 |
# File 'lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb', line 41 def items attributes.fetch(:items) end |
#kind ⇒ any
A full document diagnostic report.
23 24 25 |
# File 'lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb', line 23 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.
53 54 55 |
# File 'lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb', line 53 def attributes.fetch(:relatedDocuments) end |
#result_id ⇒ string
An optional result id. If provided it will be sent on the next diagnostic request for the same document.
33 34 35 |
# File 'lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb', line 33 def result_id attributes.fetch(:resultId) end |
#to_hash ⇒ Object
59 60 61 |
# File 'lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb', line 59 def to_hash attributes end |
#to_json(*args) ⇒ Object
63 64 65 |
# File 'lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb', line 63 def to_json(*args) to_hash.to_json(*args) end |