Sha256: 796661c977bb56e306c5d3eccb278caed47eee819c6bffe22ca77c1648638c57

Contents?: true

Size: 571 Bytes

Versions: 24

Compression:

Stored size: 571 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 scoped(*args)
          call(*args).scoped
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
mongoid-multi-db-3.0.0 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.2.6 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.3.5 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.2.5 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.3.4 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.2.4 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.3.3 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.3.2 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.2.3 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.3.1 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.3.0 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.2.2 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.2.1 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.2.0 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.1.9 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.1.8 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.1.7 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.1.6 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.1.5 lib/mongoid/extensions/proc/scoping.rb
mongoid-2.1.4 lib/mongoid/extensions/proc/scoping.rb