Class: LoanCreator::Standard

Inherits:
Common
  • Object
show all
Includes:
ExcelFormulas
Defined in:
lib/loan_creator/standard.rb

Constant Summary

Constants inherited from Common

Common::OPTIONAL_ATTRIBUTES, Common::PERIODS_IN_MONTHS, Common::REQUIRED_ATTRIBUTES, Common::REQUIRED_ATTRIBUTES_TERM_DATES

Constants included from BorrowerTimetable

BorrowerTimetable::BORROWER_FINANCIAL_ATTRIBUTES

Instance Method Summary collapse

Methods included from ExcelFormulas

#ipmt, #ppmt

Methods inherited from Common

bigd, #bigd, #initialize, #periodic_interests_rate, #timetable_term_dates

Methods included from BorrowerTimetable

#borrower_timetable

Constructor Details

This class inherits a constructor from LoanCreator::Common

Instance Method Details

#lender_timetableObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/loan_creator/standard.rb', line 5

def lender_timetable
  timetable = new_timetable
  reset_current_term
  @crd_end_of_period = amount

  if term_zero?
    compute_term_zero
    timetable << current_term
  end

  duration_in_periods.times { |idx| timetable << compute_current_term(idx, timetable) }

  timetable
end