Class: Integer
Instance Method Summary collapse
-
#to_d ⇒ Object
call-seq: int.to_d -> bigdecimal.
Methods inherited from Numeric
Instance Method Details
#to_d ⇒ Object
call-seq: int.to_d -> bigdecimal
Returns the value of +int+ as a BigDecimal.
require 'bigdecimal'
require 'bigdecimal/util'
42.to_d # => 0.42e2
See also BigDecimal::new.
24 25 26 |
# File 'opal/stdlib/bigdecimal/util.rb', line 24 def to_d BigDecimal(self) end |