Class: Prawnto::TemplateHandlers::Dsl
- Defined in:
- lib/prawnto/template_handlers/dsl.rb
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.call(template) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/prawnto/template_handlers/dsl.rb', line 4 def self.call(template) <<-RUBY _prawnto_compile_setup(true) pdf = Prawn::Document.new(@prawnto_options[:prawn]) pdf.instance_eval do #{template.source} end pdf.render RUBY end |