Class: LanguageServer::Protocol::Interface::HoverParams
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::HoverParams
- Defined in:
- lib/language_server/protocol/interface/hover_params.rb
Overview
Parameters for a [HoverRequest](#HoverRequest).
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(text_document:, position:, work_done_token: nil) ⇒ HoverParams
constructor
A new instance of HoverParams.
-
#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(text_document:, position:, work_done_token: nil) ⇒ HoverParams
Returns a new instance of HoverParams.
8 9 10 11 12 13 14 15 16 |
# File 'lib/language_server/protocol/interface/hover_params.rb', line 8 def initialize(text_document:, position:, work_done_token: nil) @attributes = {} @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.
42 43 44 |
# File 'lib/language_server/protocol/interface/hover_params.rb', line 42 def attributes @attributes end |
Instance Method Details
#position ⇒ Position
The position inside the text document.
30 31 32 |
# File 'lib/language_server/protocol/interface/hover_params.rb', line 30 def position attributes.fetch(:position) end |
#text_document ⇒ TextDocumentIdentifier
The text document.
22 23 24 |
# File 'lib/language_server/protocol/interface/hover_params.rb', line 22 def text_document attributes.fetch(:textDocument) end |
#to_hash ⇒ Object
44 45 46 |
# File 'lib/language_server/protocol/interface/hover_params.rb', line 44 def to_hash attributes end |
#to_json(*args) ⇒ Object
48 49 50 |
# File 'lib/language_server/protocol/interface/hover_params.rb', line 48 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.
38 39 40 |
# File 'lib/language_server/protocol/interface/hover_params.rb', line 38 def work_done_token attributes.fetch(:workDoneToken) end |