Class: Meta::Scope
- Inherits:
-
Object
show all
- Extended by:
- Base
- Defined in:
- lib/meta/scope/base.rb,
lib/meta/scope/utils.rb
Defined Under Namespace
Modules: Base, Errors, Utils
Classes: And, Composite, Or
Class Method Summary
collapse
Methods included from Base
and, defined_scopes, include_scope, inspect, match?, match_scopes?, or, scope_name, scope_name=
Class Method Details
.include(*mods) ⇒ Object
74
75
76
77
78
79
80
|
# File 'lib/meta/scope/base.rb', line 74
def include(*mods)
scopes = mods.filter { |m| m < Meta::Scope }
mods = mods - scopes
include_scope(*scopes) if scopes.any?
super(*mods) if mods.any?
end
|
.inherited(subclass) ⇒ Object
67
68
69
70
71
72
|
# File 'lib/meta/scope/base.rb', line 67
def inherited(subclass)
subclass.include_scope(self) if self != Meta::Scope
end
|
.new(*args) ⇒ Object
63
64
65
|
# File 'lib/meta/scope/base.rb', line 63
def new(*args)
raise NoMethodError, 'Meta::Scope 类不能实例化'
end
|