Sha256: 4d7f1d754d823375a9356cb79917b58386878783a5a1af2c04d0ea2c94cdf251
Contents?: true
Size: 463 Bytes
Versions: 12
Compression:
Stored size: 463 Bytes
Contents
module PrawnPlus module TemplateHandlers class Prawn # Renders a Prawn template. It is assumed that the template will reference a # _pdf_ (a.k.a. Prawn:Document) instance. # * +template+ - Required. The template to render to a PDF. # * +options+ - Optional. The template options. Default: {}. def call template, options = {} "pdf = ::Prawn::Document.new;" + template.source + ";pdf.render;" end end end end
Version data entries
12 entries across 12 versions & 1 rubygems