Class: Payday::PdfRenderer
- Inherits:
-
Object
- Object
- Payday::PdfRenderer
- Defined in:
- lib/payday/pdf_renderer.rb
Overview
The PDF renderer. We use this internally in Payday to render pdfs, but really you should just need to call {Payday{Payday::Invoiceable{Payday::Invoiceable#render_pdf} to render pdfs yourself.
Class Method Summary collapse
-
.render(invoice) ⇒ Object
Renders the given invoice as a pdf, returning a string.
-
.render_to_file(invoice, path) ⇒ Object
Renders the given invoice as a pdf on disk.
Class Method Details
.render(invoice) ⇒ Object
Renders the given invoice as a pdf, returning a string
13 14 15 |
# File 'lib/payday/pdf_renderer.rb', line 13 def self.render(invoice) pdf(invoice).render end |
.render_to_file(invoice, path) ⇒ Object
Renders the given invoice as a pdf on disk
8 9 10 |
# File 'lib/payday/pdf_renderer.rb', line 8 def self.render_to_file(invoice, path) pdf(invoice).render_file(path) end |