Module: Scoped::ClassMethods

Defined in:
lib/scoped.rb

Instance Method Summary collapse

Instance Method Details

#scopes(&block) ⇒ Object



9
10
11
12
13
# File 'lib/scoped.rb', line 9

def scopes(&block)
  ScopeCollection.new(&block).all.each do |name, source|
    scope(name, eval(source))
  end
end