Module: Mongoid::Extensions::Proc::Scoping

Included in:
Proc
Defined in:
lib/mongoid/extensions/proc/scoping.rb

Overview

Adds functionality for criteria scoping/merging.

Instance Method Summary collapse

Instance Method Details

#as_conditions(*args) ⇒ Object

Get the proc scoped for criteria merges.

Examples:

Get the hash.

proc.scoped

Parameters:

  • args (Array)

    The arguments to delegate to the proc.

Returns:

  • (Object)

    The result of the proc call.

Since:

  • 1.0.0



19
20
21
# File 'lib/mongoid/extensions/proc/scoping.rb', line 19

def as_conditions(*args)
  call(*args).as_conditions
end