Class: LanguageServer::Protocol::Interface::WorkspaceEditClientCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::WorkspaceEditClientCapabilities
- Defined in:
- lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#document_changes ⇒ boolean
The client supports versioned document changes in ‘WorkspaceEdit`s.
-
#failure_handling ⇒ FailureHandlingKind
The failure handling strategy of a client if applying the workspace edit fails.
-
#initialize(document_changes: nil, resource_operations: nil, failure_handling: nil) ⇒ WorkspaceEditClientCapabilities
constructor
A new instance of WorkspaceEditClientCapabilities.
-
#resource_operations ⇒ ResourceOperationKind[]
The resource operations the client supports.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(document_changes: nil, resource_operations: nil, failure_handling: nil) ⇒ WorkspaceEditClientCapabilities
Returns a new instance of WorkspaceEditClientCapabilities.
5 6 7 8 9 10 11 12 13 |
# File 'lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb', line 5 def initialize(document_changes: nil, resource_operations: nil, failure_handling: nil) @attributes = {} @attributes[:documentChanges] = document_changes if document_changes @attributes[:resourceOperations] = resource_operations if resource_operations @attributes[:failureHandling] = failure_handling if failure_handling @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
41 42 43 |
# File 'lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb', line 41 def attributes @attributes end |
Instance Method Details
#document_changes ⇒ boolean
The client supports versioned document changes in ‘WorkspaceEdit`s
19 20 21 |
# File 'lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb', line 19 def document_changes attributes.fetch(:documentChanges) end |
#failure_handling ⇒ FailureHandlingKind
The failure handling strategy of a client if applying the workspace edit fails.
37 38 39 |
# File 'lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb', line 37 def failure_handling attributes.fetch(:failureHandling) end |
#resource_operations ⇒ ResourceOperationKind[]
The resource operations the client supports. Clients should at least support ‘create’, ‘rename’ and ‘delete’ files and folders.
28 29 30 |
# File 'lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb', line 28 def resource_operations attributes.fetch(:resourceOperations) end |
#to_hash ⇒ Object
43 44 45 |
# File 'lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb', line 43 def to_hash attributes end |
#to_json(*args) ⇒ Object
47 48 49 |
# File 'lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb', line 47 def to_json(*args) to_hash.to_json(*args) end |