This module handles behaviour for defining scopes on classes.
Create the new Scope. If a block is passed in, this Scope will store the block for future calls to extend.
@example Create a new scope.
Scope.new(:title => "Sir")
@param [ Hash ] conditions The scoping limitations.
# File lib/mongoid/scope.rb, line 13 def initialize(conditions = {}, &block) @conditions = conditions @extensions = Module.new(&block) if block_given? end
Generated with the Darkfish Rdoc Generator 2.