Class: LanguageServer::Protocol::Interface::DocumentLinkParams
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::DocumentLinkParams
- Defined in:
- lib/language_server/protocol/interface/document_link_params.rb
Overview
The parameters of a [DocumentLinkRequest](#DocumentLinkRequest).
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(text_document:, work_done_token: nil, partial_result_token: nil) ⇒ DocumentLinkParams
constructor
A new instance of DocumentLinkParams.
-
#partial_result_token ⇒ ProgressToken | nil
An optional token that a server can use to report partial results (e.g. streaming) to the client.
-
#text_document ⇒ TextDocumentIdentifier
The document to provide document links for.
- #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:, work_done_token: nil, partial_result_token: nil) ⇒ DocumentLinkParams
Returns a new instance of DocumentLinkParams.
8 9 10 11 12 13 14 15 16 |
# File 'lib/language_server/protocol/interface/document_link_params.rb', line 8 def initialize(text_document:, work_done_token: nil, partial_result_token: nil) @attributes = {} @attributes[:textDocument] = text_document @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)
Returns the value of attribute attributes.
43 44 45 |
# File 'lib/language_server/protocol/interface/document_link_params.rb', line 43 def attributes @attributes end |
Instance Method Details
#partial_result_token ⇒ ProgressToken | nil
An optional token that a server can use to report partial results (e.g. streaming) to the client.
39 40 41 |
# File 'lib/language_server/protocol/interface/document_link_params.rb', line 39 def partial_result_token attributes.fetch(:partialResultToken) end |
#text_document ⇒ TextDocumentIdentifier
The document to provide document links for.
22 23 24 |
# File 'lib/language_server/protocol/interface/document_link_params.rb', line 22 def text_document attributes.fetch(:textDocument) end |
#to_hash ⇒ Object
45 46 47 |
# File 'lib/language_server/protocol/interface/document_link_params.rb', line 45 def to_hash attributes end |
#to_json(*args) ⇒ Object
49 50 51 |
# File 'lib/language_server/protocol/interface/document_link_params.rb', line 49 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.
30 31 32 |
# File 'lib/language_server/protocol/interface/document_link_params.rb', line 30 def work_done_token attributes.fetch(:workDoneToken) end |