Class: LanguageServer::Protocol::Interface::TextDocumentSyncClientCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::TextDocumentSyncClientCapabilities
- Defined in:
- lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#did_save ⇒ boolean
The client supports did save notifications.
-
#dynamic_registration ⇒ boolean
Whether text document synchronization supports dynamic registration.
-
#initialize(dynamic_registration: nil, will_save: nil, will_save_wait_until: nil, did_save: nil) ⇒ TextDocumentSyncClientCapabilities
constructor
A new instance of TextDocumentSyncClientCapabilities.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#will_save ⇒ boolean
The client supports sending will save notifications.
-
#will_save_wait_until ⇒ boolean
The client supports sending a will save request and waits for a response providing text edits which will be applied to the document before it is saved.
Constructor Details
#initialize(dynamic_registration: nil, will_save: nil, will_save_wait_until: nil, did_save: nil) ⇒ TextDocumentSyncClientCapabilities
Returns a new instance of TextDocumentSyncClientCapabilities.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb', line 5 def initialize(dynamic_registration: nil, will_save: nil, will_save_wait_until: nil, did_save: nil) @attributes = {} @attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration @attributes[:willSave] = will_save if will_save @attributes[:willSaveWaitUntil] = will_save_wait_until if will_save_wait_until @attributes[:didSave] = did_save if did_save @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
50 51 52 |
# File 'lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb', line 50 def attributes @attributes end |
Instance Method Details
#did_save ⇒ boolean
The client supports did save notifications.
46 47 48 |
# File 'lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb', line 46 def did_save attributes.fetch(:didSave) end |
#dynamic_registration ⇒ boolean
Whether text document synchronization supports dynamic registration.
20 21 22 |
# File 'lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb', line 20 def dynamic_registration attributes.fetch(:dynamicRegistration) end |
#to_hash ⇒ Object
52 53 54 |
# File 'lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb', line 52 def to_hash attributes end |
#to_json(*args) ⇒ Object
56 57 58 |
# File 'lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb', line 56 def to_json(*args) to_hash.to_json(*args) end |
#will_save ⇒ boolean
The client supports sending will save notifications.
28 29 30 |
# File 'lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb', line 28 def will_save attributes.fetch(:willSave) end |
#will_save_wait_until ⇒ boolean
The client supports sending a will save request and waits for a response providing text edits which will be applied to the document before it is saved.
38 39 40 |
# File 'lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb', line 38 def will_save_wait_until attributes.fetch(:willSaveWaitUntil) end |