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, #sys_inputs

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: [], sys_inputs: {}) ⇒ Query

Returns a new instance of Query.



189
190
191
192
193
# File 'lib/typst.rb', line 189

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

Instance Attribute Details

#formatObject

Returns the value of attribute format.



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

def format
  @format
end

#result(raw: false) ⇒ Object

Returns the value of attribute result.



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

def result
  @result
end