Class: LanguageServer::Protocol::Interface::RenameOptions

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

Overview

Provider options for a [RenameRequest](#RenameRequest).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prepare_provider: nil, work_done_progress: nil) ⇒ RenameOptions



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

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

  @attributes[:prepareProvider] = prepare_provider if prepare_provider
  @attributes[:workDoneProgress] = work_done_progress if work_done_progress

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



32
33
34
# File 'lib/language_server/protocol/interface/rename_options.rb', line 32

def attributes
  @attributes
end

Instance Method Details

#prepare_providerboolean | nil

Renames should be checked and tested before being executed.

Since:

  • version 3.12.0



23
24
25
# File 'lib/language_server/protocol/interface/rename_options.rb', line 23

def prepare_provider
  attributes.fetch(:prepareProvider)
end

#to_hashObject



34
35
36
# File 'lib/language_server/protocol/interface/rename_options.rb', line 34

def to_hash
  attributes
end

#to_json(*args) ⇒ Object



38
39
40
# File 'lib/language_server/protocol/interface/rename_options.rb', line 38

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

#work_done_progressboolean | nil



28
29
30
# File 'lib/language_server/protocol/interface/rename_options.rb', line 28

def work_done_progress
  attributes.fetch(:workDoneProgress)
end