class Tilt::PrawnTemplate

Public Instance Methods

evaluate(scope, locals, &block) click to toggle source
Calls superclass method
   # File lib/tilt/prawn.rb
27 def evaluate(scope, locals, &block)
28   pdf = ::Prawn::Document.new(@options)
29   locals = locals.dup
30   locals[:pdf] = pdf
31   super
32   pdf.render
33 end
precompiled_template(locals) click to toggle source
   # File lib/tilt/prawn.rb
35 def precompiled_template(locals)
36   @data.to_str
37 end
prepare() click to toggle source
   # File lib/tilt/prawn.rb
22 def prepare
23   @options[:page_size] = 'A4' unless @options.has_key?(:page_size)
24   @options[:page_layout] = :portrait unless @options.has_key?(:page_layout)
25 end