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) ⇒ Object



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

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