Class: LanguageServer::Protocol::Interface::InlayHintParams
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::InlayHintParams
- Defined in:
- lib/language_server/protocol/interface/inlay_hint_params.rb
Overview
A parameter literal used in inlay hint requests.
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(text_document:, range:, work_done_token: nil) ⇒ InlayHintParams
constructor
A new instance of InlayHintParams.
-
#range ⇒ Range
The document range for which inlay hints should be computed.
-
#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:, range:, work_done_token: nil) ⇒ InlayHintParams
Returns a new instance of InlayHintParams.
10 11 12 13 14 15 16 17 18 |
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 10 def initialize(text_document:, range:, work_done_token: nil) @attributes = {} @attributes[:textDocument] = text_document @attributes[:range] = range @attributes[:workDoneToken] = work_done_token if work_done_token @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
44 45 46 |
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 44 def attributes @attributes end |
Instance Method Details
#range ⇒ Range
The document range for which inlay hints should be computed.
32 33 34 |
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 32 def range attributes.fetch(:range) end |
#text_document ⇒ TextDocumentIdentifier
The text document.
24 25 26 |
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 24 def text_document attributes.fetch(:textDocument) end |
#to_hash ⇒ Object
46 47 48 |
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 46 def to_hash attributes end |
#to_json(*args) ⇒ Object
50 51 52 |
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 50 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.
40 41 42 |
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 40 def work_done_token attributes.fetch(:workDoneToken) end |