module Springy::Scopes::ClassMethods
Public Instance Methods
search(options = {})
click to toggle source
# File lib/springy/scopes.rb, line 13 def search(options = {}) stretchy_scope.new stretchy_options.merge(options) end
stretch(name, block)
click to toggle source
# File lib/springy/scopes.rb, line 25 def stretch(name, block) stretchy_scope.send(:define_method, name, &block) end
stretchify(options = {})
click to toggle source
# File lib/springy/scopes.rb, line 9 def stretchify(options = {}) @stretchy_options = options end
stretchy_options()
click to toggle source
# File lib/springy/scopes.rb, line 17 def stretchy_options Hash(@stretchy_options) end
stretchy_scope()
click to toggle source
# File lib/springy/scopes.rb, line 21 def stretchy_scope @scopes_class ||= Class.new Springy::API end