Module: DataMapper::Scope

Defined in:
lib/gems/dm-core-0.9.7/lib/dm-core/scope.rb

Instance Method Summary collapse

Instance Method Details

#default_scope(repository_name = nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



6
7
8
9
10
# File 'lib/gems/dm-core-0.9.7/lib/dm-core/scope.rb', line 6

def default_scope(repository_name = nil)
  repository_name = self.default_repository_name if repository_name == :default || repository_name.nil?
  @default_scope ||= {}
  @default_scope[repository_name] ||= {}
end

#queryObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
# File 'lib/gems/dm-core-0.9.7/lib/dm-core/scope.rb', line 13

def query
  scope_stack.last
end