Class: LanguageServer::Protocol::Interface::InlayHintOptions

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

Overview

Inlay hint options used during static registration.

Since:

  • 3.17.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resolve_provider: nil, work_done_progress: nil) ⇒ InlayHintOptions

Returns a new instance of InlayHintOptions.

Since:

  • 3.17.0



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

def initialize(resolve_provider: nil, work_done_progress: nil)
  @attributes = {}

  @attributes[:resolveProvider] = resolve_provider if resolve_provider
  @attributes[:workDoneProgress] = work_done_progress if work_done_progress

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Since:

  • 3.17.0



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

def attributes
  @attributes
end

Instance Method Details

#resolve_providerboolean | nil

The server provides support to resolve additional information for an inlay hint item.

Returns:

  • (boolean | nil)

Since:

  • 3.17.0



24
25
26
# File 'lib/language_server/protocol/interface/inlay_hint_options.rb', line 24

def resolve_provider
  attributes.fetch(:resolveProvider)
end

#to_hashObject

Since:

  • 3.17.0



35
36
37
# File 'lib/language_server/protocol/interface/inlay_hint_options.rb', line 35

def to_hash
  attributes
end

#to_json(*args) ⇒ Object

Since:

  • 3.17.0



39
40
41
# File 'lib/language_server/protocol/interface/inlay_hint_options.rb', line 39

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

#work_done_progressboolean | nil

Returns:

  • (boolean | nil)

Since:

  • 3.17.0



29
30
31
# File 'lib/language_server/protocol/interface/inlay_hint_options.rb', line 29

def work_done_progress
  attributes.fetch(:workDoneProgress)
end