Sha256: 0315ab3a70e6823bf5c297d3c4ff5b21169f159111a50a2bc37069538ac38854
Contents?: true
Size: 641 Bytes
Versions: 9
Compression:
Stored size: 641 Bytes
Contents
module Mack module Rendering # :nodoc: module Engine # :nodoc: class Pdf < Mack::Rendering::Engine::Base def render(io, binding) @_pdf = ::PDF::Writer.new self.view_template.instance_variable_set("@_pdf", @_pdf) eval(io, binding) @_pdf.render end def extension :pdfw end module ViewHelpers def pdf @_pdf end end end end end end Mack::Rendering::ViewTemplate.send(:include, Mack::Rendering::Engine::Pdf::ViewHelpers) Mack::Rendering::Engine::Registry.instance.register(:action, :pdf)
Version data entries
9 entries across 9 versions & 1 rubygems