Class: Nanoc::WeasyPrint::Filter
- Inherits:
-
Filter
- Object
- Filter
- Nanoc::WeasyPrint::Filter
- Includes:
- FileUtils, Spawn
- Defined in:
- lib/nanoc/weasyprint/filter.rb
Constant Summary
Constants included from Spawn
Class Method Summary collapse
-
.default_argv ⇒ Array<String>
The default command line options forwarded to weasyprint.
Instance Method Summary collapse
Methods included from Spawn
Class Method Details
.default_argv ⇒ Array<String>
Returns The default command line options forwarded to weasyprint.
14 15 16 |
# File 'lib/nanoc/weasyprint/filter.rb', line 14 def self.default_argv @default_argv ||= [] end |
Instance Method Details
#run(content, options = {}) ⇒ void
This method returns an undefined value.
26 27 28 29 30 |
# File 'lib/nanoc/weasyprint/filter.rb', line 26 def run(content, = {}) spawn "weasyprint", [*default_argv, *([:argv] || []), temporary_file(content).path, output_filename], log: File.join(tmpdir, "weasyprint.log") end |