module ActiveEnumerable::ScopeMethod

Public Instance Methods

scope(&block) click to toggle source
# File lib/active_enumerable/scope_method.rb, line 3
def scope(&block)
  result = instance_exec(&block)
  if result.is_a? Array
    __new_relation__(result)
  else
    result
  end
end