Class: LoanCreator::InFine

Inherits:
Common
  • Object
show all
Defined in:
lib/loan_creator/in_fine.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 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

InFine is the same as a Linear loan with (duration - 1) deferred periods. Thus we’re generating a Linear loan instead of rewriting already existing code.



5
6
7
8
# File 'lib/loan_creator/in_fine.rb', line 5

def lender_timetable
  options = @options.merge(deferred_in_periods: duration_in_periods - 1)
  LoanCreator::Linear.new(**options).lender_timetable
end