Class: Typst::Query

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(selector, input, field: nil, one: false, format: "json", root: ".", font_paths: []) ⇒ Query

Returns a new instance of Query.



187
188
189
190
191
# File 'lib/typst.rb', line 187

def initialize(selector, input, field: nil, one: false, format: "json", root: ".", font_paths: [])
  super(input, root: root, font_paths: font_paths)
  self.format = format
  self.result = Typst::_query(selector, field, one, format, self.input, self.root, self.font_paths, File.dirname(__FILE__), false, {})
end

Instance Attribute Details

#formatObject

Returns the value of attribute format.



184
185
186
# File 'lib/typst.rb', line 184

def format
  @format
end

#result(raw: false) ⇒ Object

Returns the value of attribute result.



185
186
187
# File 'lib/typst.rb', line 185

def result
  @result
end