Class: LanguageServer::Protocol::Interface::WorkspaceDiagnosticParams
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::WorkspaceDiagnosticParams
- Defined in:
- lib/language_server/protocol/interface/workspace_diagnostic_params.rb
Overview
Parameters of the workspace diagnostic request.
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly
Instance Method Summary collapse
-
#identifier ⇒ string | nil
The additional identifier provided during registration.
-
#initialize(identifier: nil, previous_result_ids:, work_done_token: nil, partial_result_token: nil) ⇒ WorkspaceDiagnosticParams
constructor
A new instance of WorkspaceDiagnosticParams.
-
#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_ids ⇒ PreviousResultId[]
The currently known diagnostic reports with their previous result ids.
- #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(identifier: nil, previous_result_ids:, work_done_token: nil, partial_result_token: nil) ⇒ WorkspaceDiagnosticParams
Returns a new instance of WorkspaceDiagnosticParams.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 10 def initialize(identifier: nil, previous_result_ids:, work_done_token: nil, partial_result_token: nil) @attributes = {} @attributes[:identifier] = identifier if identifier @attributes[:previousResultIds] = previous_result_ids @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)
55 56 57 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 55 def attributes @attributes end |
Instance Method Details
#identifier ⇒ string | nil
The additional identifier provided during registration.
25 26 27 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 25 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.
51 52 53 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 51 def partial_result_token attributes.fetch(:partialResultToken) end |
#previous_result_ids ⇒ PreviousResultId[]
The currently known diagnostic reports with their previous result ids.
34 35 36 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 34 def previous_result_ids attributes.fetch(:previousResultIds) end |
#to_hash ⇒ Object
57 58 59 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 57 def to_hash attributes end |
#to_json(*args) ⇒ Object
61 62 63 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 61 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.
42 43 44 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 42 def work_done_token attributes.fetch(:workDoneToken) end |