Sha256: 7614af37cee50cbcd85960d59d6db2be9313c458f756f782e64fb24e6fc76002
Contents?: true
Size: 617 Bytes
Versions: 2
Compression:
Stored size: 617 Bytes
Contents
module EmailBills class View attr_reader :vendor, :split def initialize(vendor, split = 3) @vendor = vendor @split = split end def render puts "#{vendor.title}" puts "-----------------" puts "Billed Date Amount" vendor.receipts.each do |receipt| puts "#{receipt.date.strftime('%b %d %Y')} #{receipt.value.round(2)}" if receipt.value? end puts "" puts "#{vendor.title} total: #{vendor.total.round(2)}" puts "#{vendor.title} total each: #{(vendor.total / 3).round(2)}" puts "" puts "" puts "" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
email_bills-0.1.1 | lib/email_bills/view.rb |
email_bills-0.1.0 | lib/email_bills/view.rb |