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-12.4.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-12.3.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-12.2.3 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-12.2.2 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-12.2.1 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-12.2.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-12.1.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-12.0.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-11.2.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-11.1.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-11.0.4 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-11.0.3 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-11.0.2 lib/prawn_plus/template_handlers/prawn.rb