class LanguageServer::Protocol::Interface::NotebookCellArrayChange
A change describing how to move a ‘NotebookCell` array from state S to S’.
Attributes
attributes[R]
Public Class Methods
new(start:, delete_count:, cells: nil)
click to toggle source
# File lib/language_server/protocol/interface/notebook_cell_array_change.rb, line 9 def initialize(start:, delete_count:, cells: nil) @attributes = {} @attributes[:start] = start @attributes[:deleteCount] = delete_count @attributes[:cells] = cells if cells @attributes.freeze end
Public Instance Methods
cells()
click to toggle source
The new cells, if any
@return [NotebookCell
# File lib/language_server/protocol/interface/notebook_cell_array_change.rb, line 39 def cells attributes.fetch(:cells) end
delete_count()
click to toggle source
The deleted cells
@return [number]
# File lib/language_server/protocol/interface/notebook_cell_array_change.rb, line 31 def delete_count attributes.fetch(:deleteCount) end
start()
click to toggle source
The start offset of the cell that changed.
@return [number]
# File lib/language_server/protocol/interface/notebook_cell_array_change.rb, line 23 def start attributes.fetch(:start) end
to_hash()
click to toggle source
# File lib/language_server/protocol/interface/notebook_cell_array_change.rb, line 45 def to_hash attributes end
to_json(*args)
click to toggle source
# File lib/language_server/protocol/interface/notebook_cell_array_change.rb, line 49 def to_json(*args) to_hash.to_json(*args) end