Class: Prawn::SwissQRBill::Bill
- Inherits:
-
Object
- Object
- Prawn::SwissQRBill::Bill
- Defined in:
- lib/prawn/swiss_qr_bill/bill.rb
Overview
Bill renders the Swiss QR-bill at the bottom of a page
Constant Summary collapse
- FONT_DIR =
File.("#{__dir__}/../../../assets/fonts")
Instance Method Summary collapse
- #draw ⇒ Object
-
#initialize(document, data, options = {}) ⇒ Bill
constructor
A new instance of Bill.
Constructor Details
#initialize(document, data, options = {}) ⇒ Bill
Returns a new instance of Bill.
9 10 11 12 13 |
# File 'lib/prawn/swiss_qr_bill/bill.rb', line 9 def initialize(document, data, = {}) @doc = document @data = data @options = || {} end |
Instance Method Details
#draw ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/prawn/swiss_qr_bill/bill.rb', line 15 def draw set_font @doc.canvas do Sections.draw_all(@doc, @data, @options) CuttingLines.new(@doc).draw end end |