Sha256: cd17b08ba1471bc1e193240ee9e9f4f419b672d7844eefd2ed652d79a2bf374f

Contents?: true

Size: 346 Bytes

Versions: 8

Compression:

Stored size: 346 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;" + template.source + ";pdf.render;"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
prawn_plus-11.0.1 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-11.0.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-10.5.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-10.4.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-10.3.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-10.2.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-10.1.0 lib/prawn_plus/template_handlers/prawn.rb
prawn_plus-10.0.0 lib/prawn_plus/template_handlers/prawn.rb