Class: Platanus::PrawnBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/platanus/templates/prawn.rb

Overview

Template Handler, just exposes prawn to a template.

Class Method Summary collapse

Class Method Details

.call(template) ⇒ Object



17
18
19
20
21
# File 'lib/platanus/templates/prawn.rb', line 17

def self.call(template)
  # Create a new pdf doc object using a block, populate the block using
  # the template contents.
  "pdf = Prawn::Document.new(:skip_page_creation => true);" + template.source + ";pdf.render;"
end