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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of InlayHintOptions.



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

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

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

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



31
32
33
# File 'lib/language_server/protocol/interface/inlay_hint_options.rb', line 31

def attributes
  @attributes
end

Instance Method Details

#resolve_providerboolean

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

Returns:

  • (boolean)


27
28
29
# File 'lib/language_server/protocol/interface/inlay_hint_options.rb', line 27

def resolve_provider
  attributes.fetch(:resolveProvider)
end

#to_hashObject



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

def to_hash
  attributes
end

#to_json(*args) ⇒ Object



37
38
39
# File 'lib/language_server/protocol/interface/inlay_hint_options.rb', line 37

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

#work_done_progressboolean

Returns:

  • (boolean)


18
19
20
# File 'lib/language_server/protocol/interface/inlay_hint_options.rb', line 18

def work_done_progress
  attributes.fetch(:workDoneProgress)
end