Class: LanguageServer::Protocol::Interface::WorkspaceUnchangedDocumentDiagnosticReport
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::WorkspaceUnchangedDocumentDiagnosticReport
- Defined in:
- lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb
Overview
An unchanged document diagnostic report for a workspace diagnostic result.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(kind:, result_id:, uri:, version:) ⇒ WorkspaceUnchangedDocumentDiagnosticReport
constructor
A new instance of WorkspaceUnchangedDocumentDiagnosticReport.
-
#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
-
#uri ⇒ string
The URI for which diagnostic information is reported.
-
#version ⇒ number
The version number for which the diagnostics are reported.
Constructor Details
#initialize(kind:, result_id:, uri:, version:) ⇒ WorkspaceUnchangedDocumentDiagnosticReport
Returns a new instance of WorkspaceUnchangedDocumentDiagnosticReport.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 8 def initialize(kind:, result_id:, uri:, version:) @attributes = {} @attributes[:kind] = kind @attributes[:resultId] = result_id @attributes[:uri] = uri @attributes[:version] = version @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
56 57 58 |
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 56 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.
26 27 28 |
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 26 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.
35 36 37 |
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 35 def result_id attributes.fetch(:resultId) end |
#to_hash ⇒ Object
58 59 60 |
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 58 def to_hash attributes end |
#to_json(*args) ⇒ Object
62 63 64 |
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 62 def to_json(*args) to_hash.to_json(*args) end |
#uri ⇒ string
The URI for which diagnostic information is reported.
43 44 45 |
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 43 def uri attributes.fetch(:uri) end |
#version ⇒ number
The version number for which the diagnostics are reported. If the document is not marked as open ‘null` can be provided.
52 53 54 |
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 52 def version attributes.fetch(:version) end |