Sha256: 74e3e651cf2adaae9fbdfb2d7ea6d4c34a11281e78441a8e1080b7e70c998299

Contents?: true

Size: 337 Bytes

Versions: 33

Compression:

Stored size: 337 Bytes

Contents

# frozen_string_literal: true

module PrawnPlus
  module TemplateHandlers
    # Renderer for a Prawn template. Assumes the template will reference a _pdf_ (a.k.a.
    # Prawn:Document) instance.
    class Prawn
      def call _template, source
        "pdf = ::Prawn::Document.new;" + source + ";pdf.render;"
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
prawn_plus-15.11.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-15.10.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-15.9.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-15.8.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-15.7.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-15.6.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-15.5.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-15.4.1 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-15.3.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-15.2.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-15.1.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-15.0.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-14.0.2 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-14.0.1 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-14.0.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-13.0.3 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-13.0.2 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-13.0.1 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-13.0.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-12.5.0 lib/prawn_plus/template_handlers/prawn.rb