Sha256: 51d22a0c153c520e545a6f27d45ed1d85724ea950c57142a798ee534c7cfa30a
Contents?: true
Size: 405 Bytes
Versions: 1
Compression:
Stored size: 405 Bytes
Contents
require 'slim2pdf' w = Slim2pdf::Writer.new('doc/examples/invoices/template.slim') buyers = ['Buyer A', 'Buyer B', 'Buyer C', 'Buyer D'] buyers.each_with_index do |buyer, index| number = index + 1 w.data = { seller: 'Seller', buyer: buyer, number: "#{number}/2014", item_name: 'Service', price: '$100', date: '2014-01-14' } w.save_to_pdf("doc/examples/invoices/output-#{number}.pdf") end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
slim2pdf-0.0.1 | doc/examples/invoices/script.rb |