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
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#identifier ⇒ string
The additional identifier provided during registration.
-
#initialize(work_done_token: nil, partial_result_token: nil, identifier: nil, previous_result_ids:) ⇒ WorkspaceDiagnosticParams
constructor
A new instance of WorkspaceDiagnosticParams.
-
#partial_result_token ⇒ ProgressToken
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
An optional token that a server can use to report work done progress.
Constructor Details
#initialize(work_done_token: nil, partial_result_token: nil, identifier: nil, previous_result_ids:) ⇒ WorkspaceDiagnosticParams
Returns a new instance of WorkspaceDiagnosticParams.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 8 def initialize(work_done_token: nil, partial_result_token: nil, identifier: nil, previous_result_ids:) @attributes = {} @attributes[:workDoneToken] = work_done_token if work_done_token @attributes[:partialResultToken] = partial_result_token if partial_result_token @attributes[:identifier] = identifier if identifier @attributes[:previousResultIds] = previous_result_ids @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
53 54 55 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 53 def attributes @attributes end |
Instance Method Details
#identifier ⇒ string
The additional identifier provided during registration.
40 41 42 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 40 def identifier attributes.fetch(:identifier) end |
#partial_result_token ⇒ ProgressToken
An optional token that a server can use to report partial results (e.g. streaming) to the client.
32 33 34 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 32 def partial_result_token attributes.fetch(:partialResultToken) end |
#previous_result_ids ⇒ PreviousResultId[]
The currently known diagnostic reports with their previous result ids.
49 50 51 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 49 def previous_result_ids attributes.fetch(:previousResultIds) end |
#to_hash ⇒ Object
55 56 57 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 55 def to_hash attributes end |
#to_json(*args) ⇒ Object
59 60 61 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 59 def to_json(*args) to_hash.to_json(*args) end |
#work_done_token ⇒ ProgressToken
An optional token that a server can use to report work done progress.
23 24 25 |
# File 'lib/language_server/protocol/interface/workspace_diagnostic_params.rb', line 23 def work_done_token attributes.fetch(:workDoneToken) end |