Class: LoanCreator::UncapitalizedBullet

Inherits:
Common
  • Object
show all
Defined in:
lib/loan_creator/uncapitalized_bullet.rb

Constant Summary

Constants inherited from Common

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

Constants included from BorrowerTimetable

BorrowerTimetable::BORROWER_FINANCIAL_ATTRIBUTES

Instance Method Summary collapse

Methods inherited from Common

bigd, #bigd, #initialize, #periodic_interests_rate, #periodic_interests_rate_percentage

Methods included from BorrowerTimetable

#borrower_timetable

Constructor Details

This class inherits a constructor from LoanCreator::Common

Instance Method Details

#lender_timetableObject

Raises:

  • (ArgumentError)


3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/loan_creator/uncapitalized_bullet.rb', line 3

def lender_timetable
  raise ArgumentError.new(:deferred_in_periods) unless deferred_in_periods == 0
  raise ArgumentError.new(:interests_start_date) unless interests_start_date.nil?
  timetable = new_timetable
  reset_current_term
  @crd_beginning_of_period = amount
  @crd_end_of_period = amount
  (duration_in_periods - 1).times { timetable << current_term }
  compute_last_term
  timetable << current_term
  timetable
end