blend_spreadsheet_loan_generator 0.1.40 → 0.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36f54b0c351b2b367ae9742d235e2aaa484df2e16388935da8ca576aa405b862
4
- data.tar.gz: f87380832034597138217d523984e200e45c3826433ad4e25d9addc03b344da8
3
+ metadata.gz: 1357474c60cfb9e4c2856a80890d3d009fc78a66d38848e1b280ba3e1326dbd1
4
+ data.tar.gz: 6c7c524d35b0877d3d8a446142fc7c3e7bb5291af9fa9c07fc8343334e7dba6f
5
5
  SHA512:
6
- metadata.gz: 2cfa0694a3f2ef0ca4fe5e85025e1f6912bc37c2667ff0fe872add54a85664f7868dc79d79c96fdf5a753485aa5685652f7f4af9499e06f417187e85448e5eed
7
- data.tar.gz: 5dbd7beb01e12da8b58f6402769c0842b0929a61e04fefc93f427ba94b5ccc34d53b21517b2dad53b9f32eea6f620636d03638f000dafe76d787f927e72635ba
6
+ metadata.gz: 774098b91a0e32d71bfa251adf70f888e5a2447172da89fe6f8310d2e6dc460910c3c9e60cf05589e41fd03a95ad466b3ee1fc3a1f2c2e98d3713ef49a96736e
7
+ data.tar.gz: 269d14778cc7c31d65a900e6542cc2a0dfe101d07aa2670b11bf8ed22b9556cf13d97df81b2d64a3f615d7c03d5b50a52baf56927b7904c6b04d72c5e46bf009
@@ -87,14 +87,14 @@ module BlendSpreadsheetLoanGenerator
87
87
  end
88
88
  end
89
89
 
90
- def apply_formulas(worksheet:, early_repayment?: true)
90
+ def apply_formulas(worksheet:, early_repayment: true)
91
91
  columns.each.with_index do |title, column|
92
92
  worksheet[1, column + 1] = title
93
93
  end
94
94
  loan.duration.times do |line|
95
95
  columns.each.with_index do |title, column|
96
96
  if early_repayment && title == 'period_calculated_fees'
97
- worksheet[line + 2, column + 1] = @formula.send("#{title}_formula", line: line + 2, early_repayment?: true)
97
+ worksheet[line + 2, column + 1] = @formula.send("#{title}_formula", line: line + 2, early_repayment: true)
98
98
  else
99
99
  worksheet[line + 2, column + 1] = @formula.send("#{title}_formula", line: line + 2)
100
100
  end
@@ -127,7 +127,7 @@ module BlendSpreadsheetLoanGenerator
127
127
 
128
128
  @formula = Formula.new(loan: loan)
129
129
 
130
- apply_formulas(worksheet: worksheet, early_repayment?: true)
130
+ apply_formulas(worksheet: worksheet, early_repayment: true)
131
131
 
132
132
  worksheet[2, columns.index('remaining_capital_start') + 1] =
133
133
  excel_float(values[last_paid_line + 1][:remaining_capital_start])
@@ -168,7 +168,7 @@ module BlendSpreadsheetLoanGenerator
168
168
  end
169
169
  end
170
170
 
171
- def period_calculated_fees_formula(line:, early_repayment?: false)
171
+ def period_calculated_fees_formula(line:, early_repayment: false)
172
172
  term = line - 1
173
173
  if loan.deferred_and_capitalized > 0 && term > loan.deferred_and_capitalized
174
174
  with_fees = "#{remaining_capital_start(line)} * (1 + #{period_rate(line)} + #{period_fees_rate(line)})^#{loan.deferred_and_capitalized} * (#{period_rate(line)} + #{period_fees_rate(line)})"
@@ -177,7 +177,7 @@ module BlendSpreadsheetLoanGenerator
177
177
  "=#{with_fees} - #{without_fees}"
178
178
  elsif loan.bullet_term?(term)
179
179
  index = (
180
- if early_repayment?
180
+ if early_repayment
181
181
  index(line - 1)
182
182
  else
183
183
  index(line)
@@ -1,7 +1,7 @@
1
1
  require 'dry/cli'
2
2
 
3
3
  module BlendSpreadsheetLoanGenerator
4
- VERSION = '0.1.40'.freeze
4
+ VERSION = '0.1.41'.freeze
5
5
 
6
6
  class Version < Dry::CLI::Command
7
7
  desc 'Print version'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blend_spreadsheet_loan_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.40
4
+ version: 0.1.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - MZiserman