Class: LanguageServer::Protocol::Interface::WorkspaceFoldersServerCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::WorkspaceFoldersServerCapabilities
- Defined in:
- lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#change_notifications ⇒ string | boolean
Whether the server wants to receive workspace folder change notifications.
-
#initialize(supported: nil, change_notifications: nil) ⇒ WorkspaceFoldersServerCapabilities
constructor
A new instance of WorkspaceFoldersServerCapabilities.
-
#supported ⇒ boolean
The server has support for workspace folders.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(supported: nil, change_notifications: nil) ⇒ WorkspaceFoldersServerCapabilities
Returns a new instance of WorkspaceFoldersServerCapabilities.
5 6 7 8 9 10 11 12 |
# File 'lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb', line 5 def initialize(supported: nil, change_notifications: nil) @attributes = {} @attributes[:supported] = supported if supported @attributes[:changeNotifications] = change_notifications if change_notifications @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
36 37 38 |
# File 'lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb', line 36 def attributes @attributes end |
Instance Method Details
#change_notifications ⇒ string | boolean
Whether the server wants to receive workspace folder change notifications.
If a string is provided, the string is treated as an ID under which the notification is registered on the client side. The ID can be used to unregister for these events using the ‘client/unregisterCapability` request.
32 33 34 |
# File 'lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb', line 32 def change_notifications attributes.fetch(:changeNotifications) end |
#supported ⇒ boolean
The server has support for workspace folders
18 19 20 |
# File 'lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb', line 18 def supported attributes.fetch(:supported) end |
#to_hash ⇒ Object
38 39 40 |
# File 'lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb', line 38 def to_hash attributes end |
#to_json(*args) ⇒ Object
42 43 44 |
# File 'lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb', line 42 def to_json(*args) to_hash.to_json(*args) end |