Class: LanguageServer::Protocol::Interface::NotebookCellArrayChange
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::NotebookCellArrayChange
- Defined in:
- lib/language_server/protocol/interface/notebook_cell_array_change.rb
Overview
A change describing how to move a NotebookCell array from state S to S’.
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly
Instance Method Summary collapse
-
#cells ⇒ NotebookCell[] | nil
The new cells, if any.
-
#delete_count ⇒ uinteger
The deleted cells.
-
#initialize(start:, delete_count:, cells: nil) ⇒ NotebookCellArrayChange
constructor
A new instance of NotebookCellArrayChange.
-
#start ⇒ uinteger
The start oftest of the cell that changed.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(start:, delete_count:, cells: nil) ⇒ NotebookCellArrayChange
Returns a new instance of NotebookCellArrayChange.
11 12 13 14 15 16 17 18 19 |
# File 'lib/language_server/protocol/interface/notebook_cell_array_change.rb', line 11 def initialize(start:, delete_count:, cells: nil) @attributes = {} @attributes[:start] = start @attributes[:deleteCount] = delete_count @attributes[:cells] = cells if cells @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
45 46 47 |
# File 'lib/language_server/protocol/interface/notebook_cell_array_change.rb', line 45 def attributes @attributes end |
Instance Method Details
#cells ⇒ NotebookCell[] | nil
The new cells, if any
41 42 43 |
# File 'lib/language_server/protocol/interface/notebook_cell_array_change.rb', line 41 def cells attributes.fetch(:cells) end |
#delete_count ⇒ uinteger
The deleted cells
33 34 35 |
# File 'lib/language_server/protocol/interface/notebook_cell_array_change.rb', line 33 def delete_count attributes.fetch(:deleteCount) end |
#start ⇒ uinteger
The start oftest of the cell that changed.
25 26 27 |
# File 'lib/language_server/protocol/interface/notebook_cell_array_change.rb', line 25 def start attributes.fetch(:start) end |
#to_hash ⇒ Object
47 48 49 |
# File 'lib/language_server/protocol/interface/notebook_cell_array_change.rb', line 47 def to_hash attributes end |
#to_json(*args) ⇒ Object
51 52 53 |
# File 'lib/language_server/protocol/interface/notebook_cell_array_change.rb', line 51 def to_json(*args) to_hash.to_json(*args) end |