class Integer
Public Instance Methods
Source
# File vendor/bundle/ruby/3.4.0/gems/bigdecimal-3.1.9/lib/bigdecimal/util.rb, line 23 def to_d BigDecimal(self) end
Returns the value of int
as a BigDecimal
.
require 'bigdecimal' require 'bigdecimal/util' 42.to_d # => 0.42e2
See also Kernel.BigDecimal
.