Sha256: 2d3177c0663d3b4181d68e3415c8ce001579f73971d5c8156142030d9caedc83

Contents?: true

Size: 958 Bytes

Versions: 27

Compression:

Stored size: 958 Bytes

Contents

# frozen_string_literal: true
# encoding: utf-8

module Mongoid
  module Extensions
    module Decimal128

      # Evolve the decimal128.
      #
      # @example Evolve the decimal128.
      #   decimal128.__evolve_decimal128__
      #
      # @return [ BSON::Decimal128 ] self.
      #
      # @since 6.1.0
      def __evolve_decimal128__
        self
      end

      module ClassMethods

        # Evolve the object into a mongo-friendly value to query with.
        #
        # @example Evolve the object.
        #   Decimal128.evolve(dec)
        #
        # @param [ Object ] object The object to evolve.
        #
        # @return [ BSON::Decimal128 ] The decimal128.
        #
        # @since 6.1.0
        def evolve(object)
          object.__evolve_decimal128__
        end
      end
    end
  end
end

BSON::Decimal128.__send__(:include, Mongoid::Extensions::Decimal128)
BSON::Decimal128.extend(Mongoid::Extensions::Decimal128::ClassMethods)

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
mongoid-7.3.5 lib/mongoid/extensions/decimal128.rb
mongoid-7.3.4 lib/mongoid/extensions/decimal128.rb
mongoid-7.1.11 lib/mongoid/extensions/decimal128.rb
mongoid-7.2.6 lib/mongoid/extensions/decimal128.rb
mongoid-7.3.3 lib/mongoid/extensions/decimal128.rb
mongoid-7.3.2 lib/mongoid/extensions/decimal128.rb
mongoid-7.2.5 lib/mongoid/extensions/decimal128.rb
mongoid-7.1.10 lib/mongoid/extensions/decimal128.rb
mongoid-7.1.9 lib/mongoid/extensions/decimal128.rb
mongoid-7.2.4 lib/mongoid/extensions/decimal128.rb
mongoid-7.3.1 lib/mongoid/extensions/decimal128.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/mongoid-7.1.7/lib/mongoid/extensions/decimal128.rb
mongoid-7.3.0 lib/mongoid/extensions/decimal128.rb
mongoid-7.2.3 lib/mongoid/extensions/decimal128.rb
mongoid-7.1.8 lib/mongoid/extensions/decimal128.rb
mongoid-7.2.2 lib/mongoid/extensions/decimal128.rb
mongoid-7.2.1 lib/mongoid/extensions/decimal128.rb
mongoid-7.1.7 lib/mongoid/extensions/decimal128.rb
mongoid-7.2.0 lib/mongoid/extensions/decimal128.rb
mongoid-7.1.6 lib/mongoid/extensions/decimal128.rb