Class: PrawnPlus::TemplateHandlers::Prawn

Inherits:
Object
  • Object
show all
Defined in:
lib/prawn_plus/template_handlers/prawn.rb

Overview

Renderer for a Prawn template. Assumes the template will reference a pdf (a.k.a. Prawn:Document) instance.

Instance Method Summary collapse

Instance Method Details

#call(_template, source) ⇒ Object



8
9
10
# File 'lib/prawn_plus/template_handlers/prawn.rb', line 8

def call _template, source
  "pdf = ::Prawn::Document.new;" + source + ";pdf.render;"
end