Module: DeathAndTaxes::Taxable::InstanceMethods
- Defined in:
- lib/death_and_taxes/taxable.rb
Instance Method Summary collapse
Instance Method Details
#apply_taxes(taxes) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/death_and_taxes/taxable.rb', line 33 def apply_taxes(taxes) taxes = [taxes] unless taxes.is_a? Array self.taxations = taxes.collect do |tax| Taxation.new :amount => tax.apply(amount).round, :percentage => tax.percentage, :name => tax.name, :account_number => tax.account_number end end |