class LanguageServer::Protocol::Interface::NotebookDocumentChangeEvent

A change event for a notebook document.

Attributes

attributes[R]

Public Class Methods

new(metadata: nil, cells: nil) click to toggle source
# File lib/language_server/protocol/interface/notebook_document_change_event.rb, line 8
def initialize(metadata: nil, cells: nil)
  @attributes = {}

  @attributes[:metadata] = metadata if metadata
  @attributes[:cells] = cells if cells

  @attributes.freeze
end

Public Instance Methods

cells() click to toggle source

Changes to cells

@return [{ structure?: { array: NotebookCellArrayChange; didOpen?: TextDocumentItem[]; didClose?: TextDocumentIdentifier[]; }; data?: NotebookCell[]; textContent?: { …; }[]; }]

# File lib/language_server/protocol/interface/notebook_document_change_event.rb, line 29
def cells
  attributes.fetch(:cells)
end
metadata() click to toggle source

The changed meta data if any.

@return [LSPObject]

# File lib/language_server/protocol/interface/notebook_document_change_event.rb, line 21
def metadata
  attributes.fetch(:metadata)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/notebook_document_change_event.rb, line 35
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/notebook_document_change_event.rb, line 39
def to_json(*args)
  to_hash.to_json(*args)
end