Sha256: 3971f16c7149c8ef69436feea3aeb946b6aebb42a5267ab3cbcbbddc3ae88474

Contents?: true

Size: 585 Bytes

Versions: 164

Compression:

Stored size: 585 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc:
  module Extensions #:nodoc:
    module Proc #:nodoc:

      # Adds functionality for criteria scoping/merging.
      module Scoping

        # Get the proc scoped for criteria merges.
        #
        # @example Get the hash.
        #   proc.scoped
        #
        # @param [ Array ] args The arguments to delegate to the proc.
        #
        # @return [ Object ] The result of the proc call.
        #
        # @since 1.0.0
        def as_conditions(*args)
          call(*args).as_conditions
        end
      end
    end
  end
end

Version data entries

164 entries across 72 versions & 3 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.5 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.5 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.4 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.4 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.4 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.3 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.3 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.3 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/extensions/proc/scoping.rb
mongoid-2.8.1 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.8.0 lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.2 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.2 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.2 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.1 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.1 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.1 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.0 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.0 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/extensions/proc/scoping.rb
classiccms-0.7.0 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/extensions/proc/scoping.rb