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
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(work_done_token: nil, text_document:, range:) ⇒ InlayHintParams
constructor
A new instance of InlayHintParams.
-
#range ⇒ Range
The visible 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
An optional token that a server can use to report work done progress.
Constructor Details
#initialize(work_done_token: nil, text_document:, range:) ⇒ InlayHintParams
Returns a new instance of InlayHintParams.
8 9 10 11 12 13 14 15 16 |
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 8 def initialize(work_done_token: nil, text_document:, range:) @attributes = {} @attributes[:workDoneToken] = work_done_token if work_done_token @attributes[:textDocument] = text_document @attributes[:range] = range @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
42 43 44 |
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 42 def attributes @attributes end |
Instance Method Details
#range ⇒ Range
The visible document range for which inlay hints should be computed.
38 39 40 |
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 38 def range attributes.fetch(:range) end |
#text_document ⇒ TextDocumentIdentifier
The text document.
30 31 32 |
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 30 def text_document attributes.fetch(:textDocument) end |
#to_hash ⇒ Object
44 45 46 |
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 44 def to_hash attributes end |
#to_json(*args) ⇒ Object
48 49 50 |
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 48 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.
22 23 24 |
# File 'lib/language_server/protocol/interface/inlay_hint_params.rb', line 22 def work_done_token attributes.fetch(:workDoneToken) end |