Class: LanguageServer::Protocol::Interface::SignatureHelpParams
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::SignatureHelpParams
- Defined in:
- lib/language_server/protocol/interface/signature_help_params.rb
Overview
Parameters for a [SignatureHelpRequest](#SignatureHelpRequest).
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#context ⇒ SignatureHelpContext | nil
The signature help context.
-
#initialize(context: nil, text_document:, position:, work_done_token: nil) ⇒ SignatureHelpParams
constructor
A new instance of SignatureHelpParams.
-
#position ⇒ Position
The position inside the text document.
-
#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(context: nil, text_document:, position:, work_done_token: nil) ⇒ SignatureHelpParams
Returns a new instance of SignatureHelpParams.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 8 def initialize(context: nil, text_document:, position:, work_done_token: nil) @attributes = {} @attributes[:context] = context if context @attributes[:textDocument] = text_document @attributes[:position] = position @attributes[:workDoneToken] = work_done_token if work_done_token @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
54 55 56 |
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 54 def attributes @attributes end |
Instance Method Details
#context ⇒ SignatureHelpContext | nil
The signature help context. This is only available if the client specifies to send this using the client capability ‘textDocument.signatureHelp.contextSupport === true`
26 27 28 |
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 26 def context attributes.fetch(:context) end |
#position ⇒ Position
The position inside the text document.
42 43 44 |
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 42 def position attributes.fetch(:position) end |
#text_document ⇒ TextDocumentIdentifier
The text document.
34 35 36 |
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 34 def text_document attributes.fetch(:textDocument) end |
#to_hash ⇒ Object
56 57 58 |
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 56 def to_hash attributes end |
#to_json(*args) ⇒ Object
60 61 62 |
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 60 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/signature_help_params.rb', line 50 def work_done_token attributes.fetch(:workDoneToken) end |