Module: ActiveMocker::ActiveRecord::Scope Private

Included in:
Base
Defined in:
lib/active_mocker/active_record/scope.rb

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

Instance Method Summary collapse

Instance Method Details

#get_named_scopesObject

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.



11
12
13
# File 'lib/active_mocker/active_record/scope.rb', line 11

def get_named_scopes
  @scope_methods ||= {}
end

#scope(method_name, proc) ⇒ 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.



7
8
9
# File 'lib/active_mocker/active_record/scope.rb', line 7

def scope(method_name, proc)
  get_named_scopes[method_name] = proc
end