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

198
199
200
# File 'lib/finance/amortization.rb', line 198

def amortize(*rates, &block)
  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