class Holst::JupyterCell

Included Modules

Defined in:

holst.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

Instance Method Detail

def cell_type : String #

def cell_type=(cell_type : String) #

def execution_count : Int32? #

def execution_count=(execution_count : Int32?) #

def get_image : Bytes? #

def has_data? : Bool #

def has_image? : Bool #

def id : String? #

def id=(id : String?) #

def is_code? : Bool #

def is_markdown? : Bool #

def metadata : JSON::Any #

def metadata=(metadata : JSON::Any) #

def outputs : Array(Hash(String, JSON::Any))? #

def outputs=(outputs : Array(Hash(String, JSON::Any))?) #

def source : Array(String)? #

def source=(source : Array(String)?) #

def type : CellType #

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