Module: Prawn::SwissQRBill::Sections

Defined in:
lib/prawn/swiss_qr_bill/sections.rb,
lib/prawn/swiss_qr_bill/sections/qr_code.rb,
lib/prawn/swiss_qr_bill/sections/section.rb,
lib/prawn/swiss_qr_bill/sections/payment_title.rb,
lib/prawn/swiss_qr_bill/sections/receipt_title.rb,
lib/prawn/swiss_qr_bill/sections/payment_amount.rb,
lib/prawn/swiss_qr_bill/sections/receipt_amount.rb,
lib/prawn/swiss_qr_bill/sections/receipt_acceptance.rb,
lib/prawn/swiss_qr_bill/sections/payment_information.rb,
lib/prawn/swiss_qr_bill/sections/receipt_information.rb,
lib/prawn/swiss_qr_bill/sections/payment_further_information.rb

Overview

Sections module manages all different sections.

Defined Under Namespace

Classes: PaymentAmount, PaymentFurtherInformation, PaymentInformation, PaymentTitle, QRCode, ReceiptAcceptance, ReceiptAmount, ReceiptInformation, ReceiptTitle, Section

Constant Summary collapse

SECTION_CLASSES =

All relevant classes to draw the full bill, ordered by drawing order.

[
  ReceiptTitle,
  ReceiptInformation,
  ReceiptAmount,
  ReceiptAcceptance,
  PaymentTitle,
  PaymentInformation,
  PaymentAmount,
  PaymentFurtherInformation,
  QRCode
].freeze

Class Method Summary collapse

Class Method Details

.draw_all(document, data, options = {}) ⇒ Object

Draw all sections in the right order.



22
23
24
25
26
# File 'lib/prawn/swiss_qr_bill/sections.rb', line 22

def self.draw_all(document, data, options = {})
  SECTION_CLASSES.each do |klass|
    klass.new(document, data, options).draw
  end
end