Class: PuppetPdf::PdfCreator

Inherits:
Object
  • Object
show all
Includes:
Utils::YarnWrapper
Defined in:
lib/puppet_pdf/pdf_creator.rb

Instance Method Summary collapse

Methods included from Utils::YarnWrapper

#run_yarn, #validate_yarn_installation

Constructor Details

#initialize(task, source, options = {}) ⇒ PdfCreator

Returns a new instance of PdfCreator.



8
9
10
11
12
13
14
# File 'lib/puppet_pdf/pdf_creator.rb', line 8

def initialize(task, source, options = {})
  validate_yarn_installation

  @task = task
  @source = source
  @output_path = options.fetch(:output_path, default_output_path)
end

Instance Method Details

#callObject



16
17
18
19
# File 'lib/puppet_pdf/pdf_creator.rb', line 16

def call
  run_yarn(task, source, output_path)
  output_path
end