Class: LanguageServer::Protocol::Interface::RenameRegistrationOptions
- Inherits:
-
TextDocumentRegistrationOptions
- Object
- TextDocumentRegistrationOptions
- LanguageServer::Protocol::Interface::RenameRegistrationOptions
- Defined in:
- lib/language_server/protocol/interface/rename_registration_options.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(document_selector:, prepare_provider: nil) ⇒ RenameRegistrationOptions
constructor
A new instance of RenameRegistrationOptions.
-
#prepare_provider ⇒ boolean
Renames should be checked and tested for validity before being executed.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Methods inherited from TextDocumentRegistrationOptions
Constructor Details
#initialize(document_selector:, prepare_provider: nil) ⇒ RenameRegistrationOptions
Returns a new instance of RenameRegistrationOptions.
5 6 7 8 9 10 11 12 |
# File 'lib/language_server/protocol/interface/rename_registration_options.rb', line 5 def initialize(document_selector:, prepare_provider: nil) @attributes = {} @attributes[:documentSelector] = document_selector @attributes[:prepareProvider] = prepare_provider if prepare_provider @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
22 23 24 |
# File 'lib/language_server/protocol/interface/rename_registration_options.rb', line 22 def attributes @attributes end |
Instance Method Details
#prepare_provider ⇒ boolean
Renames should be checked and tested for validity before being executed.
18 19 20 |
# File 'lib/language_server/protocol/interface/rename_registration_options.rb', line 18 def prepare_provider attributes.fetch(:prepareProvider) end |
#to_hash ⇒ Object
24 25 26 |
# File 'lib/language_server/protocol/interface/rename_registration_options.rb', line 24 def to_hash attributes end |
#to_json(*args) ⇒ Object
28 29 30 |
# File 'lib/language_server/protocol/interface/rename_registration_options.rb', line 28 def to_json(*args) to_hash.to_json(*args) end |