Class: Transmuter::Format::Pdf
- Inherits:
-
Object
- Object
- Transmuter::Format::Pdf
- Defined in:
- lib/transmuter/format/pdf.rb
Instance Method Summary collapse
-
#initialize(html, options = {}) ⇒ Pdf
constructor
A new instance of Pdf.
- #process ⇒ Object
Constructor Details
#initialize(html, options = {}) ⇒ Pdf
Returns a new instance of Pdf.
7 8 9 10 |
# File 'lib/transmuter/format/pdf.rb', line 7 def initialize(html, = {}) () @html = html end |
Instance Method Details
#process ⇒ Object
12 13 14 15 16 |
# File 'lib/transmuter/format/pdf.rb', line 12 def process kit = PDFKit.new(@html, :page_size => @options[:page_size]) kit.to_pdf end |