Class: BSON::Decimal128::Builder::FromBigDecimal Private
- Inherits:
-
Object
- Object
- BSON::Decimal128::Builder::FromBigDecimal
- Defined in:
- lib/bson/decimal128/builder.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Helper class for parsing a BigDecimal into Decimal128 high and low bits.
Instance Method Summary collapse
-
#bits ⇒ Array
private
Get the bits representing the Decimal128 that the big decimal corresponds to.
-
#initialize(big_decimal) ⇒ FromBigDecimal
constructor
private
Initialize the FromBigDecimal Builder object.
Constructor Details
#initialize(big_decimal) ⇒ FromBigDecimal
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize the FromBigDecimal Builder object.
286 287 288 |
# File 'lib/bson/decimal128/builder.rb', line 286 def initialize(big_decimal) @big_decimal = big_decimal end |
Instance Method Details
#bits ⇒ Array
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Get the bits representing the Decimal128 that the big decimal corresponds to.
298 299 300 301 302 303 304 |
# File 'lib/bson/decimal128/builder.rb', line 298 def bits if special? to_special_bits else to_bits end end |