Class: Bankroll::TotalPeriods
- Inherits:
-
Object
- Object
- Bankroll::TotalPeriods
- Extended by:
- Callable, Dry::Initializer
- Defined in:
- lib/bankroll/total_periods.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
19 20 21 22 23 |
# File 'lib/bankroll/total_periods.rb', line 19 def call return (-@present_value - @future_value) / @payment if interest_rate.zero? Bankroll::Decimal[periods] end |