# File lib/dm-core/model/scope.rb, line 62 def with_exclusive_scope(query) query = if query.kind_of?(Hash) repository.new_query(self, query) else query.dup end scope_stack = self.scope_stack scope_stack << query.options begin yield query.freeze ensure scope_stack.pop end end