Class: LanguageServer::Protocol::Interface::RenameClientCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::RenameClientCapabilities
- Defined in:
- lib/language_server/protocol/interface/rename_client_capabilities.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#dynamic_registration ⇒ boolean
Whether rename supports dynamic registration.
-
#honors_change_annotations ⇒ boolean
Whether the client honors the change annotations in text edits and resource operations returned via the rename request’s workspace edit by for example presenting the workspace edit in the user interface and asking for confirmation.
-
#initialize(dynamic_registration: nil, prepare_support: nil, prepare_support_default_behavior: nil, honors_change_annotations: nil) ⇒ RenameClientCapabilities
constructor
A new instance of RenameClientCapabilities.
-
#prepare_support ⇒ boolean
Client supports testing for validity of rename operations before execution.
-
#prepare_support_default_behavior ⇒ 1
Client supports the default behavior result (‘{ defaultBehavior: boolean }`).
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(dynamic_registration: nil, prepare_support: nil, prepare_support_default_behavior: nil, honors_change_annotations: nil) ⇒ RenameClientCapabilities
Returns a new instance of RenameClientCapabilities.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/language_server/protocol/interface/rename_client_capabilities.rb', line 5 def initialize(dynamic_registration: nil, prepare_support: nil, prepare_support_default_behavior: nil, honors_change_annotations: nil) @attributes = {} @attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration @attributes[:prepareSupport] = prepare_support if prepare_support @attributes[:prepareSupportDefaultBehavior] = prepare_support_default_behavior if prepare_support_default_behavior @attributes[:honorsChangeAnnotations] = honors_change_annotations if honors_change_annotations @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
57 58 59 |
# File 'lib/language_server/protocol/interface/rename_client_capabilities.rb', line 57 def attributes @attributes end |
Instance Method Details
#dynamic_registration ⇒ boolean
Whether rename supports dynamic registration.
20 21 22 |
# File 'lib/language_server/protocol/interface/rename_client_capabilities.rb', line 20 def dynamic_registration attributes.fetch(:dynamicRegistration) end |
#honors_change_annotations ⇒ boolean
Whether the client honors the change annotations in text edits and resource operations returned via the rename request’s workspace edit by for example presenting the workspace edit in the user interface and asking for confirmation.
53 54 55 |
# File 'lib/language_server/protocol/interface/rename_client_capabilities.rb', line 53 def honors_change_annotations attributes.fetch(:honorsChangeAnnotations) end |
#prepare_support ⇒ boolean
Client supports testing for validity of rename operations before execution.
29 30 31 |
# File 'lib/language_server/protocol/interface/rename_client_capabilities.rb', line 29 def prepare_support attributes.fetch(:prepareSupport) end |
#prepare_support_default_behavior ⇒ 1
Client supports the default behavior result (‘{ defaultBehavior: boolean }`).
The value indicates the default behavior used by the client.
41 42 43 |
# File 'lib/language_server/protocol/interface/rename_client_capabilities.rb', line 41 def prepare_support_default_behavior attributes.fetch(:prepareSupportDefaultBehavior) end |
#to_hash ⇒ Object
59 60 61 |
# File 'lib/language_server/protocol/interface/rename_client_capabilities.rb', line 59 def to_hash attributes end |
#to_json(*args) ⇒ Object
63 64 65 |
# File 'lib/language_server/protocol/interface/rename_client_capabilities.rb', line 63 def to_json(*args) to_hash.to_json(*args) end |