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.
280 281 282 |
# File 'lib/bson/decimal128/builder.rb', line 280 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.
292 293 294 295 296 297 298 |
# File 'lib/bson/decimal128/builder.rb', line 292 def bits if special? to_special_bits else to_bits end end |