Class: Gly::PreviewBuilder
- Inherits:
-
Object
- Object
- Gly::PreviewBuilder
- Defined in:
- lib/gly/preview_builder.rb
Overview
builds the pdf preview from assets prepared by PreviewGenerator
Instance Attribute Summary collapse
-
#main_tex ⇒ Object
Returns the value of attribute main_tex.
Instance Method Summary collapse
- #add_gabc(path) ⇒ Object
- #build ⇒ Object
-
#initialize ⇒ PreviewBuilder
constructor
A new instance of PreviewBuilder.
Constructor Details
#initialize ⇒ PreviewBuilder
Returns a new instance of PreviewBuilder.
5 6 7 8 |
# File 'lib/gly/preview_builder.rb', line 5 def initialize @gabcs = [] @main_tex = nil end |
Instance Attribute Details
#main_tex ⇒ Object
Returns the value of attribute main_tex.
14 15 16 |
# File 'lib/gly/preview_builder.rb', line 14 def main_tex @main_tex end |
Instance Method Details
#add_gabc(path) ⇒ Object
10 11 12 |
# File 'lib/gly/preview_builder.rb', line 10 def add_gabc(path) @gabcs << path end |
#build ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/gly/preview_builder.rb', line 16 def build @gabcs.each do |g| outfile = g.sub /(\.gabc)?$/i, '.gtex' benevolent_exec('gregorio', '-o', outfile, g) end exec 'lualatex', '--interaction=nonstopmode', @main_tex end |