Class: Taxedo::Builder::Text

Inherits:
Base
  • Object
show all
Defined in:
lib/taxedo/builder/text.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #price, #subtotal, #t, #taxes, #total

Constructor Details

This class inherits a constructor from Taxedo::Builder::Base

Instance Method Details

#generateObject



2
3
4
5
6
7
8
# File 'lib/taxedo/builder/text.rb', line 2

def generate
  line t('subtotal'), subtotal
  taxes.each { |tax| line tax.name, tax.amount }
  line t('total'), total

  return @content.join("\n")
end