module BSON::BigDecimal::ClassMethods
def from_bson(buffer, **options)
-
(BigDecimal | BSON::Decimal128)
- The decimal object.
Options Hash:
(**options)
-
:mode
(nil | :bson
) -- Decoding mode to use.
Parameters:
-
buffer
(ByteBuffer
) -- The byte buffer.
Other tags:
- Example: Get the BigDecimal from BSON. -
def from_bson(buffer, **options) dec128 = Decimal128.from_bson(buffer, **options) if options[:mode] == :bson dec128 else dec128.to_d end end