class

Holst::JupyterCell

Inherits JSON::Serializable < Reference < Object

Constructors

new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

cell_type
Source
cell_type=(cell_type : String)
Source
execution_count
Source
execution_count=(execution_count : Int32 | Nil)
Source
get_image
Source
has_data?
Source
has_image?
Source
id=(id : String | Nil)
Source
is_code?
Source
is_markdown?
Source
metadata
Source
metadata=(metadata : JSON::Any)
Source
outputs
Source
outputs=(outputs : Array(Hash(String, JSON::Any)) | Nil)
Source
source
Source
source=(source : Array(String) | Nil)
Source
type

Returns the cell's type as a CellType, either Markdown or code

Example:

notebook.cells[0].type # => Holst::CellType::MARKDOWN
notebook.cells[1].type # => Holst::CellType::CODE
Source