Class: BlendSpreadsheetLoanGenerator::SimpleInterests
- Inherits:
-
Object
- Object
- BlendSpreadsheetLoanGenerator::SimpleInterests
- Includes:
- SpreadsheetConcern
- Defined in:
- lib/blend_spreadsheet_loan_generator/simple_interests.rb
Instance Attribute Summary collapse
-
#loan ⇒ Object
Returns the value of attribute loan.
Instance Method Summary collapse
-
#initialize(loan:) ⇒ SimpleInterests
constructor
A new instance of SimpleInterests.
- #period_fees_rate_formula ⇒ Object
- #period_rate_formula ⇒ Object
Constructor Details
#initialize(loan:) ⇒ SimpleInterests
Returns a new instance of SimpleInterests.
6 7 8 |
# File 'lib/blend_spreadsheet_loan_generator/simple_interests.rb', line 6 def initialize(loan:) @loan = loan end |
Instance Attribute Details
#loan ⇒ Object
Returns the value of attribute loan.
5 6 7 |
# File 'lib/blend_spreadsheet_loan_generator/simple_interests.rb', line 5 def loan @loan end |
Instance Method Details
#period_fees_rate_formula ⇒ Object
14 15 16 |
# File 'lib/blend_spreadsheet_loan_generator/simple_interests.rb', line 14 def period_fees_rate_formula(*) "=#{excel_float(loan.fees_rate)} * #{loan.period_duration} / 12,0" end |
#period_rate_formula ⇒ Object
10 11 12 |
# File 'lib/blend_spreadsheet_loan_generator/simple_interests.rb', line 10 def period_rate_formula(*) "=#{excel_float(loan.rate)} * #{loan.period_duration} / 12,0" end |