Class: LanguageServer::Protocol::Interface::DocumentDiagnosticParams
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::DocumentDiagnosticParams
- Defined in:
- lib/language_server/protocol/interface/document_diagnostic_params.rb
Overview
Parameters of the document diagnostic request.
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly
Instance Method Summary collapse
-
#identifier ⇒ string | nil
The additional identifier provided during registration.
-
#initialize(text_document:, identifier: nil, previous_result_id: nil, work_done_token: nil, partial_result_token: nil) ⇒ DocumentDiagnosticParams
constructor
A new instance of DocumentDiagnosticParams.
-
#partial_result_token ⇒ ProgressToken | nil
An optional token that a server can use to report partial results (e.g. streaming) to the client.
-
#previous_result_id ⇒ string | nil
The result id of a previous response if provided.
-
#text_document ⇒ TextDocumentIdentifier
The text document.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#work_done_token ⇒ ProgressToken | nil
An optional token that a server can use to report work done progress.
Constructor Details
#initialize(text_document:, identifier: nil, previous_result_id: nil, work_done_token: nil, partial_result_token: nil) ⇒ DocumentDiagnosticParams
Returns a new instance of DocumentDiagnosticParams.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/language_server/protocol/interface/document_diagnostic_params.rb', line 10 def initialize(text_document:, identifier: nil, previous_result_id: nil, work_done_token: nil, partial_result_token: nil) @attributes = {} @attributes[:textDocument] = text_document @attributes[:identifier] = identifier if identifier @attributes[:previousResultId] = previous_result_id if previous_result_id @attributes[:workDoneToken] = work_done_token if work_done_token @attributes[:partialResultToken] = partial_result_token if partial_result_token @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
63 64 65 |
# File 'lib/language_server/protocol/interface/document_diagnostic_params.rb', line 63 def attributes @attributes end |
Instance Method Details
#identifier ⇒ string | nil
The additional identifier provided during registration.
34 35 36 |
# File 'lib/language_server/protocol/interface/document_diagnostic_params.rb', line 34 def identifier attributes.fetch(:identifier) end |
#partial_result_token ⇒ ProgressToken | nil
An optional token that a server can use to report partial results (e.g. streaming) to the client.
59 60 61 |
# File 'lib/language_server/protocol/interface/document_diagnostic_params.rb', line 59 def partial_result_token attributes.fetch(:partialResultToken) end |
#previous_result_id ⇒ string | nil
The result id of a previous response if provided.
42 43 44 |
# File 'lib/language_server/protocol/interface/document_diagnostic_params.rb', line 42 def previous_result_id attributes.fetch(:previousResultId) end |
#text_document ⇒ TextDocumentIdentifier
The text document.
26 27 28 |
# File 'lib/language_server/protocol/interface/document_diagnostic_params.rb', line 26 def text_document attributes.fetch(:textDocument) end |
#to_hash ⇒ Object
65 66 67 |
# File 'lib/language_server/protocol/interface/document_diagnostic_params.rb', line 65 def to_hash attributes end |
#to_json(*args) ⇒ Object
69 70 71 |
# File 'lib/language_server/protocol/interface/document_diagnostic_params.rb', line 69 def to_json(*args) to_hash.to_json(*args) end |
#work_done_token ⇒ ProgressToken | nil
An optional token that a server can use to report work done progress.
50 51 52 |
# File 'lib/language_server/protocol/interface/document_diagnostic_params.rb', line 50 def work_done_token attributes.fetch(:workDoneToken) end |