Class: LanguageServer::Protocol::Interface::InlineValueParams

Inherits:
Object
  • Object
show all
Defined in:
lib/language_server/protocol/interface/inline_value_params.rb

Overview

A parameter literal used in inline value requests.

Since:

  • 3.17.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text_document:, range:, context:, work_done_token: nil) ⇒ InlineValueParams

Returns a new instance of InlineValueParams.

Since:

  • 3.17.0



10
11
12
13
14
15
16
17
18
19
# File 'lib/language_server/protocol/interface/inline_value_params.rb', line 10

def initialize(text_document:, range:, context:, work_done_token: nil)
  @attributes = {}

  @attributes[:textDocument] = text_document
  @attributes[:range] = range
  @attributes[:context] = context
  @attributes[:workDoneToken] = work_done_token if work_done_token

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Since:

  • 3.17.0



54
55
56
# File 'lib/language_server/protocol/interface/inline_value_params.rb', line 54

def attributes
  @attributes
end

Instance Method Details

#contextInlineValueContext

Additional information about the context in which inline values were requested.

Since:

  • 3.17.0



42
43
44
# File 'lib/language_server/protocol/interface/inline_value_params.rb', line 42

def context
  attributes.fetch(:context)
end

#rangeRange

The document range for which inline values should be computed.

Since:

  • 3.17.0



33
34
35
# File 'lib/language_server/protocol/interface/inline_value_params.rb', line 33

def range
  attributes.fetch(:range)
end

#text_documentTextDocumentIdentifier

The text document.

Since:

  • 3.17.0



25
26
27
# File 'lib/language_server/protocol/interface/inline_value_params.rb', line 25

def text_document
  attributes.fetch(:textDocument)
end

#to_hashObject

Since:

  • 3.17.0



56
57
58
# File 'lib/language_server/protocol/interface/inline_value_params.rb', line 56

def to_hash
  attributes
end

#to_json(*args) ⇒ Object

Since:

  • 3.17.0



60
61
62
# File 'lib/language_server/protocol/interface/inline_value_params.rb', line 60

def to_json(*args)
  to_hash.to_json(*args)
end

#work_done_tokenProgressToken | nil

An optional token that a server can use to report work done progress.

Since:

  • 3.17.0



50
51
52
# File 'lib/language_server/protocol/interface/inline_value_params.rb', line 50

def work_done_token
  attributes.fetch(:workDoneToken)
end