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
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(kind:, result_id:) ⇒ UnchangedDocumentDiagnosticReport
constructor
A new instance of UnchangedDocumentDiagnosticReport.
-
#kind ⇒ any
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.
9 10 11 12 13 14 15 16 |
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 9 def initialize(kind:, result_id:) @attributes = {} @attributes[:kind] = kind @attributes[:resultId] = result_id @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
38 39 40 |
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 38 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/unchanged_document_diagnostic_report.rb', line 25 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.
34 35 36 |
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 34 def result_id attributes.fetch(:resultId) end |
#to_hash ⇒ Object
40 41 42 |
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 40 def to_hash attributes end |
#to_json(*args) ⇒ Object
44 45 46 |
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 44 def to_json(*args) to_hash.to_json(*args) end |