Class: NilClass
| Relationships & Source Files | |
| Inherits: | Object |
| Defined in: | lib/bigdecimal/util.rb |
Instance Method Summary
-
#to_d ⇒ bigdecimal
Returns nil represented as a
::BigDecimal.
Instance Method Details
#to_d ⇒ bigdecimal
Returns nil represented as a ::BigDecimal.
require 'bigdecimal'
require 'bigdecimal/util'
nil.to_d # => 0.0
# File 'lib/bigdecimal/util.rb', line 183
def to_d BigDecimal(0) end