Method: Finance::Amortization#payments

Defined in:
lib/finance/amortization.rb

#paymentsArray

Returns the amount of the payment in each period.

Examples:

find the total payments for a loan

rate = Rate.new(0.0375, :apr, :duration => (30 * 12))
amt = 300000.amortize(rate)
amt.payments.sum #=> DecNum('-500163.94')

Returns:

  • (Array)

    the amount of the payment in each period



184
185
186
# File 'lib/finance/amortization.rb', line 184

def payments
  @transactions.find_all(&:payment?).collect{ |p| p.amount }
end