Module: ActiveEnumerable::Scopes
Defined Under Namespace
Modules: ClassMethods
Class Method Summary
collapse
Instance Method Summary
collapse
#scope
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/active_enumerable/scopes.rb', line 4
def method_missing(meth, *args, &block)
if create_scope_method(meth)
send(meth, *args, &block)
else
super
end
end
|
Class Method Details
.included(base) ⇒ Object
36
37
38
|
# File 'lib/active_enumerable/scopes.rb', line 36
def self.included(base)
base.extend(ClassMethods)
end
|
Instance Method Details
#respond_to_missing?(meth, _include_private = false) ⇒ Boolean
12
13
14
|
# File 'lib/active_enumerable/scopes.rb', line 12
def respond_to_missing?(meth, _include_private = false)
create_scope_method(meth)
end
|