Class: LanguageServer::Protocol::Interface::UnchangedDocumentDiagnosticReport
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::UnchangedDocumentDiagnosticReport
- Defined in:
- lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb
Overview
A diagnostic report indicating that the last returned report is still accurate.
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(kind:, result_id:) ⇒ UnchangedDocumentDiagnosticReport
constructor
A new instance of UnchangedDocumentDiagnosticReport.
-
#kind ⇒ "unchanged"
A document diagnostic report indicating no changes to the last result.
-
#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:) ⇒ UnchangedDocumentDiagnosticReport
Returns a new instance of UnchangedDocumentDiagnosticReport.
11 12 13 14 15 16 17 18 |
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 11 def initialize(kind:, result_id:) @attributes = {} @attributes[:kind] = kind @attributes[:resultId] = result_id @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
40 41 42 |
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 40 def attributes @attributes end |
Instance Method Details
#kind ⇒ "unchanged"
A document diagnostic report indicating no changes to the last result. A server can only return unchanged if result ids are provided.
27 28 29 |
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 27 def kind attributes.fetch(:kind) end |
#result_id ⇒ string
A result id which will be sent on the next diagnostic request for the same document.
36 37 38 |
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 36 def result_id attributes.fetch(:resultId) end |
#to_hash ⇒ Object
42 43 44 |
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 42 def to_hash attributes end |
#to_json(*args) ⇒ Object
46 47 48 |
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 46 def to_json(*args) to_hash.to_json(*args) end |