Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/finance/decimal.rb,
lib/finance/amortization.rb

Instance Method Summary collapse

Instance Method Details

#amortize(*rates, &block) ⇒ Object

See Also:

  • Amortization#new


193
194
195
# File 'lib/finance/amortization.rb', line 193

def amortize(*rates, &block)
  amortization = Finance::Amortization.new(self, *rates, &block)
end

#to_dObject



14
15
16
17
18
19
20
# File 'lib/finance/decimal.rb', line 14

def to_d
  if self.instance_of? DecNum
    self
  else
    DecNum self.to_s
  end
end