-
-
Save joemsak/e644ea58745bb31d661b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
class PackingSlip < Prawn::Document | |
# recognized options | |
# :needs_cover_page => true|false | |
def initialize(orders, options = {}) | |
super(:page_layout => :portrait) | |
@orders = orders | |
@options = options | |
default_leading 5 | |
cover_page if cover_page_needed? | |
@orders.each do |order| | |
order_page(order) | |
start_new_page unless order == orders.last | |
end | |
end | |
# ... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you please also include the structure of
order_page(order)
here ?Would make it complete ?