Class: LanguageServer::Protocol::Interface::TextDocumentSyncOptions
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::TextDocumentSyncOptions
- Defined in:
- lib/language_server/protocol/interface/text_document_sync_options.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#change ⇒ number
Change notifications are sent to the server.
-
#initialize(open_close: nil, change: nil, will_save: nil, will_save_wait_until: nil, save: nil) ⇒ TextDocumentSyncOptions
constructor
A new instance of TextDocumentSyncOptions.
-
#open_close ⇒ boolean
Open and close notifications are sent to the server.
-
#save ⇒ SaveOptions
Save notifications are sent to the server.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#will_save ⇒ boolean
Will save notifications are sent to the server.
-
#will_save_wait_until ⇒ boolean
Will save wait until requests are sent to the server.
Constructor Details
#initialize(open_close: nil, change: nil, will_save: nil, will_save_wait_until: nil, save: nil) ⇒ TextDocumentSyncOptions
Returns a new instance of TextDocumentSyncOptions.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/language_server/protocol/interface/text_document_sync_options.rb', line 5 def initialize(open_close: nil, change: nil, will_save: nil, will_save_wait_until: nil, save: nil) @attributes = {} @attributes[:openClose] = open_close if open_close @attributes[:change] = change if change @attributes[:willSave] = will_save if will_save @attributes[:willSaveWaitUntil] = will_save_wait_until if will_save_wait_until @attributes[:save] = save if save @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
58 59 60 |
# File 'lib/language_server/protocol/interface/text_document_sync_options.rb', line 58 def attributes @attributes end |
Instance Method Details
#change ⇒ number
Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
30 31 32 |
# File 'lib/language_server/protocol/interface/text_document_sync_options.rb', line 30 def change attributes.fetch(:change) end |
#open_close ⇒ boolean
Open and close notifications are sent to the server.
21 22 23 |
# File 'lib/language_server/protocol/interface/text_document_sync_options.rb', line 21 def open_close attributes.fetch(:openClose) end |
#save ⇒ SaveOptions
Save notifications are sent to the server.
54 55 56 |
# File 'lib/language_server/protocol/interface/text_document_sync_options.rb', line 54 def save attributes.fetch(:save) end |
#to_hash ⇒ Object
60 61 62 |
# File 'lib/language_server/protocol/interface/text_document_sync_options.rb', line 60 def to_hash attributes end |
#to_json(*args) ⇒ Object
64 65 66 |
# File 'lib/language_server/protocol/interface/text_document_sync_options.rb', line 64 def to_json(*args) to_hash.to_json(*args) end |
#will_save ⇒ boolean
Will save notifications are sent to the server.
38 39 40 |
# File 'lib/language_server/protocol/interface/text_document_sync_options.rb', line 38 def will_save attributes.fetch(:willSave) end |
#will_save_wait_until ⇒ boolean
Will save wait until requests are sent to the server.
46 47 48 |
# File 'lib/language_server/protocol/interface/text_document_sync_options.rb', line 46 def will_save_wait_until attributes.fetch(:willSaveWaitUntil) end |