Class: LanguageServer::Protocol::Interface::RenameRegistrationOptions
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::RenameRegistrationOptions
- Defined in:
- lib/language_server/protocol/interface/rename_registration_options.rb
Overview
Registration options for a [RenameRequest](#RenameRequest).
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#document_selector ⇒ DocumentSelector | null
A document selector to identify the scope of the registration.
-
#initialize(document_selector:, prepare_provider: nil, work_done_progress: nil) ⇒ RenameRegistrationOptions
constructor
A new instance of RenameRegistrationOptions.
-
#prepare_provider ⇒ boolean | nil
Renames should be checked and tested before being executed.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
- #work_done_progress ⇒ boolean | nil
Constructor Details
#initialize(document_selector:, prepare_provider: nil, work_done_progress: nil) ⇒ RenameRegistrationOptions
Returns a new instance of RenameRegistrationOptions.
8 9 10 11 12 13 14 15 16 |
# File 'lib/language_server/protocol/interface/rename_registration_options.rb', line 8 def initialize(document_selector:, prepare_provider: nil, work_done_progress: nil) @attributes = {} @attributes[:documentSelector] = document_selector @attributes[:prepareProvider] = prepare_provider if prepare_provider @attributes[:workDoneProgress] = work_done_progress if work_done_progress @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
42 43 44 |
# File 'lib/language_server/protocol/interface/rename_registration_options.rb', line 42 def attributes @attributes end |
Instance Method Details
#document_selector ⇒ DocumentSelector | null
A document selector to identify the scope of the registration. If set to null the document selector provided on the client side will be used.
23 24 25 |
# File 'lib/language_server/protocol/interface/rename_registration_options.rb', line 23 def document_selector attributes.fetch(:documentSelector) end |
#prepare_provider ⇒ boolean | nil
Renames should be checked and tested before being executed.
33 34 35 |
# File 'lib/language_server/protocol/interface/rename_registration_options.rb', line 33 def prepare_provider attributes.fetch(:prepareProvider) end |
#to_hash ⇒ Object
44 45 46 |
# File 'lib/language_server/protocol/interface/rename_registration_options.rb', line 44 def to_hash attributes end |
#to_json(*args) ⇒ Object
48 49 50 |
# File 'lib/language_server/protocol/interface/rename_registration_options.rb', line 48 def to_json(*args) to_hash.to_json(*args) end |
#work_done_progress ⇒ boolean | nil
38 39 40 |
# File 'lib/language_server/protocol/interface/rename_registration_options.rb', line 38 def work_done_progress attributes.fetch(:workDoneProgress) end |