class LanguageServer::Protocol::Interface::DidChangeNotebookDocumentParams
The params sent in a change notebook document notification.
Attributes
attributes[R]
Public Class Methods
new(notebook_document:, change:)
click to toggle source
# File lib/language_server/protocol/interface/did_change_notebook_document_params.rb, line 8 def initialize(notebook_document:, change:) @attributes = {} @attributes[:notebookDocument] = notebook_document @attributes[:change] = change @attributes.freeze end
Public Instance Methods
change()
click to toggle source
The actual changes to the notebook document.
The change describes single state change to the notebook document. So it moves a notebook document, its cells and its cell text document contents from state S to S’.
To mirror the content of a notebook using change events use the following approach:
-
start with the same initial content
-
apply the ‘notebookDocument/didChange’ notifications in the order
you receive them.
@return [NotebookDocumentChangeEvent]
# File lib/language_server/protocol/interface/did_change_notebook_document_params.rb, line 40 def change attributes.fetch(:change) end
notebook_document()
click to toggle source
The notebook document that did change. The version number points to the version after all provided changes have been applied.
@return [VersionedNotebookDocumentIdentifier]
# File lib/language_server/protocol/interface/did_change_notebook_document_params.rb, line 22 def notebook_document attributes.fetch(:notebookDocument) end
to_hash()
click to toggle source
# File lib/language_server/protocol/interface/did_change_notebook_document_params.rb, line 46 def to_hash attributes end
to_json(*args)
click to toggle source
# File lib/language_server/protocol/interface/did_change_notebook_document_params.rb, line 50 def to_json(*args) to_hash.to_json(*args) end