Class: Finance::Cashflow::Function Private
- Inherits:
-
Object
- Object
- Finance::Cashflow::Function
- Defined in:
- lib/finance/cashflows.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Base class for working with Newton's Method.
Instance Method Summary (collapse)
-
- (Function) initialize(transactions, function)
constructor
private
A new instance of Function.
- - (Object) values(x) private
Constructor Details
- (Function) initialize(transactions, function)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
A new instance of Function
29 30 31 32 |
# File 'lib/finance/cashflows.rb', line 29 def initialize(transactions, function) @transactions = transactions @function = function end |
Instance Method Details
- (Object) values(x)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 37 |
# File 'lib/finance/cashflows.rb', line 34 def values(x) value = @transactions.send(@function, x[0].to_d) [ BigDecimal.new(value.to_s) ] end |