Class: Pdfcraft::PdfHandler
- Inherits:
-
Object
- Object
- Pdfcraft::PdfHandler
- Defined in:
- lib/pdfcraft/pdf_template_handler.rb
Instance Method Summary collapse
Instance Method Details
#call(template) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/pdfcraft/pdf_template_handler.rb', line 8 def call(template) "def #{Pdfcraft.variable_name};" + "@#{Pdfcraft.variable_name} ||= ::Pdfcraft::Document.new;" + "end;" + template.source + ";" + "#{Pdfcraft.variable_name}.render;" end |