Module: DataMapper::Scope
- Defined in:
- lib/dm-core/scope.rb
Instance Method Summary collapse
- #default_scope(repository_name = nil) ⇒ Object private
- #query ⇒ Object private
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/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 ||= Hash.new{|h,k| h[k] = {}} @default_scope[repository_name] end |
#query ⇒ 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.
13 14 15 |
# File 'lib/dm-core/scope.rb', line 13 def query scope_stack.last end |