Module: Ohm::Scope::ClassMethods

Defined in:
lib/ohm/scope.rb

Instance Method Summary collapse

Instance Method Details

#scope(scope = nil, &block) ⇒ Object


12
13
14
15
# File 'lib/ohm/scope.rb', line 12

def scope(scope = nil, &block)
  self::DefinedScopes.module_eval(&block) if block_given?
  self::DefinedScopes.send(:include, scope) if scope
end