Class: LanguageServer::Protocol::Interface::ClientCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::ClientCapabilities
- Defined in:
- lib/language_server/protocol/interface/client_capabilities.rb
Overview
Defines the capabilities provided by the client.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#experimental ⇒ LSPAny | nil
Experimental client capabilities.
-
#general ⇒ GeneralClientCapabilities | nil
General client capabilities.
-
#initialize(workspace: nil, text_document: nil, notebook_document: nil, window: nil, general: nil, experimental: nil) ⇒ ClientCapabilities
constructor
A new instance of ClientCapabilities.
-
#notebook_document ⇒ NotebookDocumentClientCapabilities | nil
Capabilities specific to the notebook document support.
-
#text_document ⇒ TextDocumentClientCapabilities | nil
Text document specific client capabilities.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#window ⇒ WindowClientCapabilities | nil
Window specific client capabilities.
-
#workspace ⇒ WorkspaceClientCapabilities | nil
Workspace specific client capabilities.
Constructor Details
#initialize(workspace: nil, text_document: nil, notebook_document: nil, window: nil, general: nil, experimental: nil) ⇒ ClientCapabilities
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/language_server/protocol/interface/client_capabilities.rb', line 8 def initialize(workspace: nil, text_document: nil, notebook_document: nil, window: nil, general: nil, experimental: nil) @attributes = {} @attributes[:workspace] = workspace if workspace @attributes[:textDocument] = text_document if text_document @attributes[:notebookDocument] = notebook_document if notebook_document @attributes[:window] = window if window @attributes[:general] = general if general @attributes[:experimental] = experimental if experimental @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
73 74 75 |
# File 'lib/language_server/protocol/interface/client_capabilities.rb', line 73 def attributes @attributes end |
Instance Method Details
#experimental ⇒ LSPAny | nil
Experimental client capabilities.
69 70 71 |
# File 'lib/language_server/protocol/interface/client_capabilities.rb', line 69 def experimental attributes.fetch(:experimental) end |
#general ⇒ GeneralClientCapabilities | nil
General client capabilities.
61 62 63 |
# File 'lib/language_server/protocol/interface/client_capabilities.rb', line 61 def general attributes.fetch(:general) end |
#notebook_document ⇒ NotebookDocumentClientCapabilities | nil
Capabilities specific to the notebook document support.
43 44 45 |
# File 'lib/language_server/protocol/interface/client_capabilities.rb', line 43 def notebook_document attributes.fetch(:notebookDocument) end |
#text_document ⇒ TextDocumentClientCapabilities | nil
Text document specific client capabilities.
33 34 35 |
# File 'lib/language_server/protocol/interface/client_capabilities.rb', line 33 def text_document attributes.fetch(:textDocument) end |
#to_hash ⇒ Object
75 76 77 |
# File 'lib/language_server/protocol/interface/client_capabilities.rb', line 75 def to_hash attributes end |
#to_json(*args) ⇒ Object
79 80 81 |
# File 'lib/language_server/protocol/interface/client_capabilities.rb', line 79 def to_json(*args) to_hash.to_json(*args) end |
#window ⇒ WindowClientCapabilities | nil
Window specific client capabilities.
51 52 53 |
# File 'lib/language_server/protocol/interface/client_capabilities.rb', line 51 def window attributes.fetch(:window) end |
#workspace ⇒ WorkspaceClientCapabilities | nil
Workspace specific client capabilities.
25 26 27 |
# File 'lib/language_server/protocol/interface/client_capabilities.rb', line 25 def workspace attributes.fetch(:workspace) end |