Sha256: 06967b088d4b2419899f70aececad38e6266e0d35483cbf6c4245d63a5accae3
Contents?: true
Size: 435 Bytes
Versions: 38
Compression:
Stored size: 435 Bytes
Contents
# encoding: utf-8 require "bigdecimal" module Mongoid #:nodoc: module Extensions #:nodoc: module BigDecimal #:nodoc: module Conversions #:nodoc: # Get the string as a +BigDecimal+ def get(value) value ? ::BigDecimal.new(value) : value end # Set the value in the hash as a string. def set(value) value ? value.to_s : value end end end end end
Version data entries
38 entries across 38 versions & 8 rubygems