Class: Typst::HtmlExperimental

Inherits:
Base
  • Object
show all
Defined in:
lib/typst.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#font_paths, #input, #root

Instance Method Summary collapse

Methods inherited from Base

from_s, from_zip, #write

Constructor Details

#initialize(input, root: ".", font_paths: []) ⇒ HtmlExperimental

Returns a new instance of HtmlExperimental.



172
173
174
175
# File 'lib/typst.rb', line 172

def initialize(input, root: ".", font_paths: [])
  super(input, root: root, font_paths: font_paths)
  @bytes = Typst::_to_html(self.input, self.root, self.font_paths, File.dirname(__FILE__), false, {})[0]
end

Instance Attribute Details

#bytesObject

Returns the value of attribute bytes.



170
171
172
# File 'lib/typst.rb', line 170

def bytes
  @bytes
end

Instance Method Details

#documentObject Also known as: markup



177
178
179
# File 'lib/typst.rb', line 177

def document
  bytes.pack("C*").to_s
end