Class: Integer

Inherits:
Object show all
Defined in:
lib/ruby/to_d.rb

Instance Method Summary (collapse)

Instance Method Details

- (BigDecimal) to_d

Converts the integer to a BigDecimal

Examples:

10.to_d   #=> BigDecimal("10")

Returns:



45
46
47
# File 'lib/ruby/to_d.rb', line 45

def to_d
  BigDecimal(to_s)
end