Class: InvoiceBar::ReceiptPDF
- Inherits:
-
Object
- Object
- InvoiceBar::ReceiptPDF
- Includes:
- ActionView::Helpers::TranslationHelper, InvoiceBarHelper
- Defined in:
- app/models/invoice_bar/receipt_pdf.rb
Instance Method Summary collapse
-
#initialize(receipt) ⇒ ReceiptPDF
constructor
A new instance of ReceiptPDF.
- #render ⇒ Object
Methods included from InvoiceBarHelper
#active_for_controller, #formatted_amount, #formatted_money, #formatted_postcode
Constructor Details
#initialize(receipt) ⇒ ReceiptPDF
Returns a new instance of ReceiptPDF.
8 9 10 |
# File 'app/models/invoice_bar/receipt_pdf.rb', line 8 def initialize(receipt) @receipt = receipt end |
Instance Method Details
#render ⇒ Object
12 13 14 15 16 17 |
# File 'app/models/invoice_bar/receipt_pdf.rb', line 12 def render InvoicePrinter.render( document: printable_receipt, font: File.('app/assets/fonts/invoice_bar/Overpass_Regular.ttf', InvoiceBar::Engine.root) ) end |