module-cluster 1.4.4 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +21 -0
- data/README.rdoc +21 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/CascadingClass.rb +83 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/CascadingClassOrModule.rb +70 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/CascadingModule.rb +79 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/CascadingModuleOrSubclass.rb +22 -0
- data/lib/module-cluster/ModuleCluster/Define/Block/Class.rb +15 -7
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrInstance.rb +15 -7
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModule.rb +15 -7
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrInstance.rb +15 -7
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrSubclass.rb +11 -3
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrSubclass.rb +10 -2
- data/lib/module-cluster/ModuleCluster/Define/Block/Instance.rb +15 -3
- data/lib/module-cluster/ModuleCluster/Define/Block/Module.rb +15 -7
- data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrInstance.rb +15 -7
- data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrSubclass.rb +10 -2
- data/lib/module-cluster/ModuleCluster/Define/Block/Subclass.rb +13 -2
- data/lib/module-cluster/ModuleCluster/Define/Block.rb +1 -1
- data/lib/module-cluster/ModuleCluster/Define/ClassCluster.rb +19 -19
- data/lib/module-cluster/ModuleCluster/Define/ClassOrInstanceCluster.rb +34 -34
- data/lib/module-cluster/ModuleCluster/Define/Cluster.rb +19 -19
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascades.rb +19 -19
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToClass.rb +19 -19
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToModule.rb +19 -19
- data/lib/module-cluster/ModuleCluster/Define/Deprecated.rb +1 -1
- data/lib/module-cluster/ModuleCluster/Define/InstanceCluster.rb +3 -3
- data/lib/module-cluster/ModuleCluster/Define/ModuleCluster.rb +19 -19
- data/lib/module-cluster/ModuleCluster/Define/ModuleOrClassCluster.rb +43 -43
- data/lib/module-cluster/ModuleCluster/Define/ModuleOrInstanceCluster.rb +34 -34
- data/lib/module-cluster/ModuleCluster/Define/Status.rb +1 -1
- data/lib/module-cluster/ModuleCluster/Define.rb +1 -1
- data/lib/module-cluster/ModuleCluster/Suspend/Hooks.rb +1 -1
- data/lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb +1 -1
- data/lib/module-cluster/ModuleCluster/Suspend.rb +1 -1
- data/lib/module-cluster/ModuleCluster.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/ClusterStack.rb +3 -3
- data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/PerformCascades.rb +85 -32
- data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/Subclass.rb +6 -3
- data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures.rb +5 -5
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Class.rb +9 -9
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Inherited.rb +3 -3
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Instance.rb +5 -5
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Module.rb +9 -9
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Set.rb +1 -0
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Extends.rb +13 -13
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Includes.rb +10 -10
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsExtends.rb +13 -13
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsIncludes.rb +10 -10
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Set/MultiSetProxy.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Status.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Suspend.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade/Subclass.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade.rb +1 -1
- data/lib/module-cluster.rb +14 -2
- data/spec/ModuleCluster/Define/Block/CascadingClassOrModule_spec.rb +285 -0
- data/spec/ModuleCluster/Define/Block/CascadingClass_spec.rb +241 -0
- data/spec/ModuleCluster/Define/Block/CascadingModuleOrSubclass_spec.rb +56 -0
- data/spec/ModuleCluster/Define/Block/CascadingModule_spec.rb +278 -0
- data/spec/ModuleCluster/Define/Block/ClassOrInstance_spec.rb +13 -13
- data/spec/ModuleCluster/Define/Block/ClassOrModuleOrInstance_spec.rb +13 -13
- data/spec/ModuleCluster/Define/Block/ClassOrModuleOrSubclass_spec.rb +2 -3
- data/spec/ModuleCluster/Define/Block/ClassOrModule_spec.rb +13 -13
- data/spec/ModuleCluster/Define/Block/ClassOrSubclass_spec.rb +2 -2
- data/spec/ModuleCluster/Define/Block/Class_spec.rb +13 -13
- data/spec/ModuleCluster/Define/Block/Instance_spec.rb +5 -5
- data/spec/ModuleCluster/Define/Block/ModuleOrInstance_spec.rb +1 -1
- data/spec/ModuleCluster/Define/Block/ModuleOrSubclass_spec.rb +2 -4
- data/spec/ModuleCluster/Define/Block/Module_spec.rb +13 -13
- data/spec/ModuleCluster/Define/Block/Subclass_spec.rb +8 -8
- data/spec/ModuleCluster/Define/Block_spec.rb +9 -9
- data/spec/ModuleCluster/Define/ClassCluster_spec.rb +227 -227
- data/spec/ModuleCluster/Define/ClassOrInstanceCluster_spec.rb +197 -197
- data/spec/ModuleCluster/Define/ClusterCascadesToClass_spec.rb +228 -228
- data/spec/ModuleCluster/Define/ClusterCascadesToModule_spec.rb +232 -232
- data/spec/ModuleCluster/Define/ClusterCascades_spec.rb +224 -224
- data/spec/ModuleCluster/Define/Cluster_spec.rb +221 -221
- data/spec/ModuleCluster/Define/InstanceCluster_spec.rb +29 -29
- data/spec/ModuleCluster/Define/ModuleCluster_spec.rb +227 -227
- data/spec/ModuleCluster/Define/ModuleOrClassCluster_spec.rb +227 -227
- data/spec/ModuleCluster/Define/ModuleOrInstanceCluster_spec.rb +197 -197
- data/spec/ModuleCluster/Suspend/Hooks_spec.rb +120 -120
- data/spec/ModuleCluster/Suspend/WithoutHooks_spec.rb +120 -120
- data/spec/ModuleCluster_spec.rb +2 -2
- data/spec/_private_/ModuleCluster/CascadeFeatures/PerformCascades_spec.rb +192 -192
- data/spec/_private_/ModuleCluster/ClusterStack/Set/MultiSetProxy_spec.rb +129 -129
- data/spec/_private_/ModuleCluster/ClusterStack/Suspend_spec.rb +17 -17
- metadata +9 -1
data/README.md
CHANGED
@@ -271,6 +271,13 @@ Module block methods:
|
|
271
271
|
* prepend_module_extend
|
272
272
|
* prepend_module_include_or_extend
|
273
273
|
|
274
|
+
* cascading_module_include
|
275
|
+
* cascading_module_extend
|
276
|
+
* cascading_module_include_or_extend
|
277
|
+
* cascading_prepend_module_include
|
278
|
+
* cascading_prepend_module_extend
|
279
|
+
* cascading_prepend_module_include_or_extend
|
280
|
+
|
274
281
|
Class block methods:
|
275
282
|
|
276
283
|
* class_include
|
@@ -280,6 +287,13 @@ Class block methods:
|
|
280
287
|
* prepend_class_extend
|
281
288
|
* prepend_class_include_or_extend
|
282
289
|
|
290
|
+
* cascading_class_include
|
291
|
+
* cascading_class_extend
|
292
|
+
* cascading_class_include_or_extend
|
293
|
+
* cascading_prepend_class_include
|
294
|
+
* cascading_prepend_class_extend
|
295
|
+
* cascading_prepend_class_include_or_extend
|
296
|
+
|
283
297
|
Instance block methods:
|
284
298
|
|
285
299
|
* instance_extend
|
@@ -294,6 +308,13 @@ Class or module block methods:
|
|
294
308
|
* prepend_class_or_module_extend
|
295
309
|
* prepend_class_or_module_include_or_extend
|
296
310
|
|
311
|
+
* cascading_class_or_module_include
|
312
|
+
* cascading_class_or_module_extend
|
313
|
+
* cascading_class_or_module_include_or_extend
|
314
|
+
* cascading_prepend_class_or_module_include
|
315
|
+
* cascading_prepend_class_or_module_extend
|
316
|
+
* cascading_prepend_class_or_module_include_or_extend
|
317
|
+
|
297
318
|
Module or instance block methods:
|
298
319
|
|
299
320
|
* module_or_instance_extend
|
data/README.rdoc
CHANGED
@@ -261,6 +261,13 @@ Module block methods:
|
|
261
261
|
* prepend_module_extend
|
262
262
|
* prepend_module_include_or_extend
|
263
263
|
|
264
|
+
* cascading_module_include
|
265
|
+
* cascading_module_extend
|
266
|
+
* cascading_module_include_or_extend
|
267
|
+
* cascading_prepend_module_include
|
268
|
+
* cascading_prepend_module_extend
|
269
|
+
* cascading_prepend_module_include_or_extend
|
270
|
+
|
264
271
|
Class block methods:
|
265
272
|
|
266
273
|
* class_include
|
@@ -270,6 +277,13 @@ Class block methods:
|
|
270
277
|
* prepend_class_extend
|
271
278
|
* prepend_class_include_or_extend
|
272
279
|
|
280
|
+
* cascading_class_include
|
281
|
+
* cascading_class_extend
|
282
|
+
* cascading_class_include_or_extend
|
283
|
+
* cascading_prepend_class_include
|
284
|
+
* cascading_prepend_class_extend
|
285
|
+
* cascading_prepend_class_include_or_extend
|
286
|
+
|
273
287
|
Instance block methods:
|
274
288
|
|
275
289
|
* instance_extend
|
@@ -284,6 +298,13 @@ Class or module block methods:
|
|
284
298
|
* prepend_class_or_module_extend
|
285
299
|
* prepend_class_or_module_include_or_extend
|
286
300
|
|
301
|
+
* cascading_class_or_module_include
|
302
|
+
* cascading_class_or_module_extend
|
303
|
+
* cascading_class_or_module_include_or_extend
|
304
|
+
* cascading_prepend_class_or_module_include
|
305
|
+
* cascading_prepend_class_or_module_extend
|
306
|
+
* cascading_prepend_class_or_module_include_or_extend
|
307
|
+
|
287
308
|
Module or instance block methods:
|
288
309
|
|
289
310
|
* module_or_instance_extend
|
@@ -0,0 +1,83 @@
|
|
1
|
+
|
2
|
+
module ::ModuleCluster::Define::Block::CascadingClass
|
3
|
+
|
4
|
+
include ::ModuleCluster::CascadeFeatures::ClusterStack
|
5
|
+
include ::ModuleCluster::Suspend::WithoutHooks
|
6
|
+
|
7
|
+
include ::ModuleCluster::Define::Block::Subclass
|
8
|
+
|
9
|
+
extend ::ModuleCluster::ExtendForCascade
|
10
|
+
|
11
|
+
##########################
|
12
|
+
# self.should_cascade? #
|
13
|
+
##########################
|
14
|
+
|
15
|
+
def self.should_cascade?( class_or_module )
|
16
|
+
return true
|
17
|
+
end
|
18
|
+
|
19
|
+
############################
|
20
|
+
# self.should_run_block? #
|
21
|
+
############################
|
22
|
+
|
23
|
+
def self.should_run_block?( hooked_instance )
|
24
|
+
return hooked_instance.is_a?( Class )
|
25
|
+
end
|
26
|
+
|
27
|
+
#############################
|
28
|
+
# cascading_class_include #
|
29
|
+
#############################
|
30
|
+
|
31
|
+
def cascading_class_include( & runtime_block )
|
32
|
+
subclass( & runtime_block )
|
33
|
+
return cluster_stack.class_include( ::ModuleCluster::Define::Block::CascadingClass, __method__, runtime_block )
|
34
|
+
end
|
35
|
+
|
36
|
+
############################
|
37
|
+
# cascading_class_extend #
|
38
|
+
############################
|
39
|
+
|
40
|
+
def cascading_class_extend( & runtime_block )
|
41
|
+
subclass( & runtime_block )
|
42
|
+
return cluster_stack.class_extend( ::ModuleCluster::Define::Block::CascadingClass, __method__, runtime_block )
|
43
|
+
end
|
44
|
+
|
45
|
+
#######################################
|
46
|
+
# cascading_class_include_or_extend #
|
47
|
+
#######################################
|
48
|
+
|
49
|
+
def cascading_class_include_or_extend( & runtime_block )
|
50
|
+
include_set = cascading_class_include( & runtime_block )
|
51
|
+
extend_set = cascading_class_extend( & runtime_block )
|
52
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
53
|
+
end
|
54
|
+
|
55
|
+
#####################################
|
56
|
+
# cascading_prepend_class_include #
|
57
|
+
#####################################
|
58
|
+
|
59
|
+
def cascading_prepend_class_include( & runtime_block )
|
60
|
+
subclass( & runtime_block )
|
61
|
+
return cluster_stack.prepend_class_include( ::ModuleCluster::Define::Block::CascadingClass, __method__, runtime_block )
|
62
|
+
end
|
63
|
+
|
64
|
+
####################################
|
65
|
+
# cascading_prepend_class_extend #
|
66
|
+
####################################
|
67
|
+
|
68
|
+
def cascading_prepend_class_extend( & runtime_block )
|
69
|
+
subclass( & runtime_block )
|
70
|
+
return cluster_stack.prepend_class_extend( ::ModuleCluster::Define::Block::CascadingClass, __method__, runtime_block )
|
71
|
+
end
|
72
|
+
|
73
|
+
###############################################
|
74
|
+
# cascading_prepend_class_include_or_extend #
|
75
|
+
###############################################
|
76
|
+
|
77
|
+
def cascading_prepend_class_include_or_extend( & runtime_block )
|
78
|
+
include_set = cascading_prepend_class_include( & runtime_block )
|
79
|
+
extend_set = cascading_prepend_class_extend( & runtime_block )
|
80
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
|
2
|
+
module ::ModuleCluster::Define::Block::CascadingClassOrModule
|
3
|
+
|
4
|
+
include ::ModuleCluster::Define::Block::CascadingClass
|
5
|
+
include ::ModuleCluster::Define::Block::CascadingModule
|
6
|
+
include ::ModuleCluster::Suspend::WithoutHooks
|
7
|
+
|
8
|
+
extend ::ModuleCluster::ExtendForCascade
|
9
|
+
|
10
|
+
#######################################
|
11
|
+
# cascading_class_or_module_include #
|
12
|
+
#######################################
|
13
|
+
|
14
|
+
def cascading_class_or_module_include( & runtime_block )
|
15
|
+
class_set = cascading_class_include( & runtime_block )
|
16
|
+
module_set = cascading_module_include( & runtime_block )
|
17
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
|
18
|
+
end
|
19
|
+
|
20
|
+
######################################
|
21
|
+
# cascading_class_or_module_extend #
|
22
|
+
######################################
|
23
|
+
|
24
|
+
def cascading_class_or_module_extend( & runtime_block )
|
25
|
+
class_set = cascading_class_extend( & runtime_block )
|
26
|
+
module_set = cascading_module_extend( & runtime_block )
|
27
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
|
28
|
+
end
|
29
|
+
|
30
|
+
#################################################
|
31
|
+
# cascading_class_or_module_include_or_extend #
|
32
|
+
#################################################
|
33
|
+
|
34
|
+
def cascading_class_or_module_include_or_extend( & runtime_block )
|
35
|
+
include_set = cascading_class_or_module_include( & runtime_block )
|
36
|
+
extend_set = cascading_class_or_module_extend( & runtime_block )
|
37
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
38
|
+
end
|
39
|
+
|
40
|
+
###############################################
|
41
|
+
# cascading_prepend_class_or_module_include #
|
42
|
+
###############################################
|
43
|
+
|
44
|
+
def cascading_prepend_class_or_module_include( & runtime_block )
|
45
|
+
class_set = cascading_prepend_class_include( & runtime_block )
|
46
|
+
module_set = cascading_prepend_module_include( & runtime_block )
|
47
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
|
48
|
+
end
|
49
|
+
|
50
|
+
##############################################
|
51
|
+
# cascading_prepend_class_or_module_extend #
|
52
|
+
##############################################
|
53
|
+
|
54
|
+
def cascading_prepend_class_or_module_extend( & runtime_block )
|
55
|
+
class_set = cascading_prepend_class_extend( & runtime_block )
|
56
|
+
module_set = cascading_prepend_module_extend( & runtime_block )
|
57
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
|
58
|
+
end
|
59
|
+
|
60
|
+
#########################################################
|
61
|
+
# cascading_prepend_class_or_module_include_or_extend #
|
62
|
+
#########################################################
|
63
|
+
|
64
|
+
def cascading_prepend_class_or_module_include_or_extend( & runtime_block )
|
65
|
+
include_set = cascading_prepend_class_or_module_include( & runtime_block )
|
66
|
+
extend_set = cascading_prepend_class_or_module_extend( & runtime_block )
|
67
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
|
2
|
+
module ::ModuleCluster::Define::Block::CascadingModule
|
3
|
+
|
4
|
+
include ::ModuleCluster::CascadeFeatures::ClusterStack
|
5
|
+
include ::ModuleCluster::Suspend::WithoutHooks
|
6
|
+
|
7
|
+
include ::ModuleCluster::Define::Block::Subclass
|
8
|
+
|
9
|
+
extend ::ModuleCluster::ExtendForCascade
|
10
|
+
|
11
|
+
##########################
|
12
|
+
# self.should_cascade? #
|
13
|
+
##########################
|
14
|
+
|
15
|
+
def self.should_cascade?( class_or_module )
|
16
|
+
return true
|
17
|
+
end
|
18
|
+
|
19
|
+
############################
|
20
|
+
# self.should_run_block? #
|
21
|
+
############################
|
22
|
+
|
23
|
+
def self.should_run_block?( hooked_instance )
|
24
|
+
return hooked_instance.is_a?( Module ) && ! hooked_instance.is_a?( Class )
|
25
|
+
end
|
26
|
+
|
27
|
+
##############################
|
28
|
+
# cascading_module_include #
|
29
|
+
##############################
|
30
|
+
|
31
|
+
def cascading_module_include( & runtime_block )
|
32
|
+
return cluster_stack.module_include( ::ModuleCluster::Define::Block::CascadingModule, __method__, runtime_block )
|
33
|
+
end
|
34
|
+
|
35
|
+
#############################
|
36
|
+
# cascading_module_extend #
|
37
|
+
#############################
|
38
|
+
|
39
|
+
def cascading_module_extend( & runtime_block )
|
40
|
+
return cluster_stack.module_extend( ::ModuleCluster::Define::Block::CascadingModule, __method__, runtime_block )
|
41
|
+
end
|
42
|
+
|
43
|
+
########################################
|
44
|
+
# cascading_module_include_or_extend #
|
45
|
+
########################################
|
46
|
+
|
47
|
+
def cascading_module_include_or_extend( & runtime_block )
|
48
|
+
include_set = cascading_module_include( & runtime_block )
|
49
|
+
extend_set = cascading_module_extend( & runtime_block )
|
50
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
51
|
+
end
|
52
|
+
|
53
|
+
######################################
|
54
|
+
# cascading_prepend_module_include #
|
55
|
+
######################################
|
56
|
+
|
57
|
+
def cascading_prepend_module_include( & runtime_block )
|
58
|
+
return cluster_stack.prepend_module_include( ::ModuleCluster::Define::Block::CascadingModule, __method__, runtime_block )
|
59
|
+
end
|
60
|
+
|
61
|
+
#####################################
|
62
|
+
# cascading_prepend_module_extend #
|
63
|
+
#####################################
|
64
|
+
|
65
|
+
def cascading_prepend_module_extend( & runtime_block )
|
66
|
+
return cluster_stack.prepend_module_extend( ::ModuleCluster::Define::Block::CascadingModule, __method__, runtime_block )
|
67
|
+
end
|
68
|
+
|
69
|
+
################################################
|
70
|
+
# cascading_prepend_module_include_or_extend #
|
71
|
+
################################################
|
72
|
+
|
73
|
+
def cascading_prepend_module_include_or_extend( & runtime_block )
|
74
|
+
include_set = cascading_prepend_module_include( & runtime_block )
|
75
|
+
extend_set = cascading_prepend_module_extend( & runtime_block )
|
76
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
|
2
|
+
module ::ModuleCluster::Define::Block::CascadingModuleOrSubclass
|
3
|
+
|
4
|
+
include ::ModuleCluster::CascadeFeatures::ClusterStack
|
5
|
+
include ::ModuleCluster::Define::Block::CascadingModule
|
6
|
+
include ::ModuleCluster::Define::Block::Subclass
|
7
|
+
include ::ModuleCluster::Suspend::WithoutHooks
|
8
|
+
|
9
|
+
extend ::ModuleCluster::ExtendForCascade::Subclass
|
10
|
+
extend ::ModuleCluster::ExtendForCascade
|
11
|
+
|
12
|
+
##########################################
|
13
|
+
# cascading_module_include_or_subclass #
|
14
|
+
##########################################
|
15
|
+
|
16
|
+
def cascading_module_include_or_subclass( & runtime_block )
|
17
|
+
module_set = cascading_module_include( & runtime_block )
|
18
|
+
subclass_set = subclass( & runtime_block )
|
19
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( module_set, subclass_set )
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -1,11 +1,19 @@
|
|
1
1
|
|
2
|
-
module ModuleCluster::Define::Block::Class
|
2
|
+
module ::ModuleCluster::Define::Block::Class
|
3
3
|
|
4
4
|
include ::ModuleCluster::CascadeFeatures::ClusterStack
|
5
5
|
include ::ModuleCluster::Suspend::WithoutHooks
|
6
6
|
|
7
7
|
extend ::ModuleCluster::ExtendForCascade
|
8
8
|
|
9
|
+
##########################
|
10
|
+
# self.should_cascade? #
|
11
|
+
##########################
|
12
|
+
|
13
|
+
def self.should_cascade?( class_or_module )
|
14
|
+
return false
|
15
|
+
end
|
16
|
+
|
9
17
|
############################
|
10
18
|
# self.should_run_block? #
|
11
19
|
############################
|
@@ -19,7 +27,7 @@ module ModuleCluster::Define::Block::Class
|
|
19
27
|
###################
|
20
28
|
|
21
29
|
def class_include( & runtime_block )
|
22
|
-
return cluster_stack.class_include( ModuleCluster::Define::Block::Class, runtime_block )
|
30
|
+
return cluster_stack.class_include( ::ModuleCluster::Define::Block::Class, __method__, runtime_block )
|
23
31
|
end
|
24
32
|
|
25
33
|
##################
|
@@ -27,7 +35,7 @@ module ModuleCluster::Define::Block::Class
|
|
27
35
|
##################
|
28
36
|
|
29
37
|
def class_extend( & runtime_block )
|
30
|
-
return cluster_stack.class_extend( ModuleCluster::Define::Block::Class, runtime_block )
|
38
|
+
return cluster_stack.class_extend( ::ModuleCluster::Define::Block::Class, __method__, runtime_block )
|
31
39
|
end
|
32
40
|
|
33
41
|
#############################
|
@@ -37,7 +45,7 @@ module ModuleCluster::Define::Block::Class
|
|
37
45
|
def class_include_or_extend( & runtime_block )
|
38
46
|
include_set = class_include( & runtime_block )
|
39
47
|
extend_set = class_extend( & runtime_block )
|
40
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
48
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
41
49
|
end
|
42
50
|
|
43
51
|
###########################
|
@@ -45,7 +53,7 @@ module ModuleCluster::Define::Block::Class
|
|
45
53
|
###########################
|
46
54
|
|
47
55
|
def prepend_class_include( & runtime_block )
|
48
|
-
return cluster_stack.prepend_class_include( ModuleCluster::Define::Block::Class, runtime_block )
|
56
|
+
return cluster_stack.prepend_class_include( ::ModuleCluster::Define::Block::Class, __method__, runtime_block )
|
49
57
|
end
|
50
58
|
|
51
59
|
##########################
|
@@ -53,7 +61,7 @@ module ModuleCluster::Define::Block::Class
|
|
53
61
|
##########################
|
54
62
|
|
55
63
|
def prepend_class_extend( & runtime_block )
|
56
|
-
return cluster_stack.prepend_class_extend( ModuleCluster::Define::Block::Class, runtime_block )
|
64
|
+
return cluster_stack.prepend_class_extend( ::ModuleCluster::Define::Block::Class, __method__, runtime_block )
|
57
65
|
end
|
58
66
|
|
59
67
|
#####################################
|
@@ -63,7 +71,7 @@ module ModuleCluster::Define::Block::Class
|
|
63
71
|
def prepend_class_include_or_extend( & runtime_block )
|
64
72
|
include_set = prepend_class_include( & runtime_block )
|
65
73
|
extend_set = prepend_class_extend( & runtime_block )
|
66
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
74
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
67
75
|
end
|
68
76
|
|
69
77
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
module ModuleCluster::Define::Block::ClassOrInstance
|
2
|
+
module ::ModuleCluster::Define::Block::ClassOrInstance
|
3
3
|
|
4
4
|
include ::ModuleCluster::Define::Block::Class
|
5
5
|
include ::ModuleCluster::Define::Block::Instance
|
@@ -7,6 +7,14 @@ module ModuleCluster::Define::Block::ClassOrInstance
|
|
7
7
|
|
8
8
|
extend ::ModuleCluster::ExtendForCascade
|
9
9
|
|
10
|
+
##########################
|
11
|
+
# self.should_cascade? #
|
12
|
+
##########################
|
13
|
+
|
14
|
+
def self.should_cascade?( class_or_module )
|
15
|
+
return false
|
16
|
+
end
|
17
|
+
|
10
18
|
##############################
|
11
19
|
# class_or_instance_extend #
|
12
20
|
##############################
|
@@ -14,7 +22,7 @@ module ModuleCluster::Define::Block::ClassOrInstance
|
|
14
22
|
def class_or_instance_extend( & runtime_block )
|
15
23
|
class_set = class_extend( & runtime_block )
|
16
24
|
instance_set = instance_extend( & runtime_block )
|
17
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
25
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
18
26
|
end
|
19
27
|
|
20
28
|
######################################
|
@@ -24,7 +32,7 @@ module ModuleCluster::Define::Block::ClassOrInstance
|
|
24
32
|
def class_include_or_instance_extend( & runtime_block )
|
25
33
|
class_set = class_include( & runtime_block )
|
26
34
|
instance_set = instance_extend( & runtime_block )
|
27
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
35
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
28
36
|
end
|
29
37
|
|
30
38
|
################################################
|
@@ -34,7 +42,7 @@ module ModuleCluster::Define::Block::ClassOrInstance
|
|
34
42
|
def class_include_or_extend_or_instance_extend( & runtime_block )
|
35
43
|
class_set = class_include_or_extend( & runtime_block )
|
36
44
|
instance_set = instance_extend( & runtime_block )
|
37
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
45
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
38
46
|
end
|
39
47
|
|
40
48
|
######################################
|
@@ -44,7 +52,7 @@ module ModuleCluster::Define::Block::ClassOrInstance
|
|
44
52
|
def prepend_class_or_instance_extend( & runtime_block )
|
45
53
|
class_set = prepend_class_extend( & runtime_block )
|
46
54
|
instance_set = prepend_instance_extend( & runtime_block )
|
47
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
55
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
48
56
|
end
|
49
57
|
|
50
58
|
##############################################
|
@@ -54,7 +62,7 @@ module ModuleCluster::Define::Block::ClassOrInstance
|
|
54
62
|
def prepend_class_include_or_instance_extend( & runtime_block )
|
55
63
|
class_set = prepend_class_include( & runtime_block )
|
56
64
|
instance_set = prepend_instance_extend( & runtime_block )
|
57
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
65
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
58
66
|
end
|
59
67
|
|
60
68
|
########################################################
|
@@ -64,7 +72,7 @@ module ModuleCluster::Define::Block::ClassOrInstance
|
|
64
72
|
def prepend_class_include_or_extend_or_instance_extend( & runtime_block )
|
65
73
|
class_set = prepend_class_include_or_extend( & runtime_block )
|
66
74
|
instance_set = prepend_instance_extend( & runtime_block )
|
67
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
75
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
68
76
|
end
|
69
77
|
|
70
78
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
module ModuleCluster::Define::Block::ClassOrModule
|
2
|
+
module ::ModuleCluster::Define::Block::ClassOrModule
|
3
3
|
|
4
4
|
include ::ModuleCluster::Define::Block::Class
|
5
5
|
include ::ModuleCluster::Define::Block::Module
|
@@ -7,6 +7,14 @@ module ModuleCluster::Define::Block::ClassOrModule
|
|
7
7
|
|
8
8
|
extend ::ModuleCluster::ExtendForCascade
|
9
9
|
|
10
|
+
##########################
|
11
|
+
# self.should_cascade? #
|
12
|
+
##########################
|
13
|
+
|
14
|
+
def self.should_cascade?( class_or_module )
|
15
|
+
return false
|
16
|
+
end
|
17
|
+
|
10
18
|
#############################
|
11
19
|
# class_or_module_include #
|
12
20
|
#############################
|
@@ -14,7 +22,7 @@ module ModuleCluster::Define::Block::ClassOrModule
|
|
14
22
|
def class_or_module_include( & runtime_block )
|
15
23
|
class_set = class_include( & runtime_block )
|
16
24
|
module_set = module_include( & runtime_block )
|
17
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
|
25
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
|
18
26
|
end
|
19
27
|
|
20
28
|
############################
|
@@ -24,7 +32,7 @@ module ModuleCluster::Define::Block::ClassOrModule
|
|
24
32
|
def class_or_module_extend( & runtime_block )
|
25
33
|
class_set = class_extend( & runtime_block )
|
26
34
|
module_set = module_extend( & runtime_block )
|
27
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
|
35
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
|
28
36
|
end
|
29
37
|
|
30
38
|
#######################################
|
@@ -34,7 +42,7 @@ module ModuleCluster::Define::Block::ClassOrModule
|
|
34
42
|
def class_or_module_include_or_extend( & runtime_block )
|
35
43
|
include_set = class_or_module_include( & runtime_block )
|
36
44
|
extend_set = class_or_module_extend( & runtime_block )
|
37
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
45
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
38
46
|
end
|
39
47
|
|
40
48
|
#####################################
|
@@ -44,7 +52,7 @@ module ModuleCluster::Define::Block::ClassOrModule
|
|
44
52
|
def prepend_class_or_module_include( & runtime_block )
|
45
53
|
class_set = prepend_class_include( & runtime_block )
|
46
54
|
module_set = prepend_module_include( & runtime_block )
|
47
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
|
55
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
|
48
56
|
end
|
49
57
|
|
50
58
|
####################################
|
@@ -54,7 +62,7 @@ module ModuleCluster::Define::Block::ClassOrModule
|
|
54
62
|
def prepend_class_or_module_extend( & runtime_block )
|
55
63
|
class_set = prepend_class_extend( & runtime_block )
|
56
64
|
module_set = prepend_module_extend( & runtime_block )
|
57
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
|
65
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
|
58
66
|
end
|
59
67
|
|
60
68
|
###############################################
|
@@ -64,7 +72,7 @@ module ModuleCluster::Define::Block::ClassOrModule
|
|
64
72
|
def prepend_class_or_module_include_or_extend( & runtime_block )
|
65
73
|
include_set = prepend_class_or_module_include( & runtime_block )
|
66
74
|
extend_set = prepend_class_or_module_extend( & runtime_block )
|
67
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
75
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
68
76
|
end
|
69
77
|
|
70
78
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
module ModuleCluster::Define::Block::ClassOrModuleOrInstance
|
2
|
+
module ::ModuleCluster::Define::Block::ClassOrModuleOrInstance
|
3
3
|
|
4
4
|
include ::ModuleCluster::Define::Block::ClassOrModule
|
5
5
|
include ::ModuleCluster::Define::Block::Instance
|
@@ -7,6 +7,14 @@ module ModuleCluster::Define::Block::ClassOrModuleOrInstance
|
|
7
7
|
|
8
8
|
extend ::ModuleCluster::ExtendForCascade
|
9
9
|
|
10
|
+
##########################
|
11
|
+
# self.should_cascade? #
|
12
|
+
##########################
|
13
|
+
|
14
|
+
def self.should_cascade?( class_or_module )
|
15
|
+
return false
|
16
|
+
end
|
17
|
+
|
10
18
|
########################################
|
11
19
|
# class_or_module_or_instance_extend #
|
12
20
|
########################################
|
@@ -14,7 +22,7 @@ module ModuleCluster::Define::Block::ClassOrModuleOrInstance
|
|
14
22
|
def class_or_module_or_instance_extend( & runtime_block )
|
15
23
|
class_or_module_set = class_or_module_extend( & runtime_block )
|
16
24
|
instance_set = instance_extend( & runtime_block )
|
17
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
|
25
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
|
18
26
|
end
|
19
27
|
|
20
28
|
################################################
|
@@ -24,7 +32,7 @@ module ModuleCluster::Define::Block::ClassOrModuleOrInstance
|
|
24
32
|
def class_or_module_include_or_instance_extend( & runtime_block )
|
25
33
|
class_or_module_set = class_or_module_include( & runtime_block )
|
26
34
|
instance_set = instance_extend( & runtime_block )
|
27
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
|
35
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
|
28
36
|
end
|
29
37
|
|
30
38
|
##########################################################
|
@@ -34,7 +42,7 @@ module ModuleCluster::Define::Block::ClassOrModuleOrInstance
|
|
34
42
|
def class_or_module_include_or_extend_or_instance_extend( & runtime_block )
|
35
43
|
class_or_module_set = class_or_module_include_or_extend( & runtime_block )
|
36
44
|
instance_set = instance_extend( & runtime_block )
|
37
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
|
45
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
|
38
46
|
end
|
39
47
|
|
40
48
|
################################################
|
@@ -44,7 +52,7 @@ module ModuleCluster::Define::Block::ClassOrModuleOrInstance
|
|
44
52
|
def prepend_class_or_module_or_instance_extend( & runtime_block )
|
45
53
|
class_or_module_set = prepend_class_or_module_extend( & runtime_block )
|
46
54
|
instance_set = prepend_instance_extend( & runtime_block )
|
47
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
|
55
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
|
48
56
|
end
|
49
57
|
|
50
58
|
########################################################
|
@@ -54,7 +62,7 @@ module ModuleCluster::Define::Block::ClassOrModuleOrInstance
|
|
54
62
|
def prepend_class_or_module_include_or_instance_extend( & runtime_block )
|
55
63
|
class_or_module_set = prepend_class_or_module_include( & runtime_block )
|
56
64
|
instance_set = prepend_instance_extend( & runtime_block )
|
57
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
|
65
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
|
58
66
|
end
|
59
67
|
|
60
68
|
##################################################################
|
@@ -64,7 +72,7 @@ module ModuleCluster::Define::Block::ClassOrModuleOrInstance
|
|
64
72
|
def prepend_class_or_module_include_or_extend_or_instance_extend( & runtime_block )
|
65
73
|
class_or_module_set = prepend_class_or_module_include_or_extend( & runtime_block )
|
66
74
|
instance_set = prepend_instance_extend( & runtime_block )
|
67
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
|
75
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
|
68
76
|
end
|
69
77
|
|
70
78
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
module ModuleCluster::Define::Block::ClassOrModuleOrSubclass
|
2
|
+
module ::ModuleCluster::Define::Block::ClassOrModuleOrSubclass
|
3
3
|
|
4
4
|
include ::ModuleCluster::CascadeFeatures::ClusterStack
|
5
5
|
include ::ModuleCluster::Define::Block::ClassOrModule
|
@@ -8,6 +8,14 @@ module ModuleCluster::Define::Block::ClassOrModuleOrSubclass
|
|
8
8
|
extend ::ModuleCluster::ExtendForCascade::Subclass
|
9
9
|
extend ::ModuleCluster::ExtendForCascade
|
10
10
|
|
11
|
+
##########################
|
12
|
+
# self.should_cascade? #
|
13
|
+
##########################
|
14
|
+
|
15
|
+
def self.should_cascade?( class_or_module )
|
16
|
+
return false
|
17
|
+
end
|
18
|
+
|
11
19
|
############################
|
12
20
|
# self.should_run_block? #
|
13
21
|
############################
|
@@ -22,8 +30,8 @@ module ModuleCluster::Define::Block::ClassOrModuleOrSubclass
|
|
22
30
|
|
23
31
|
def class_or_module_include_or_subclass( & runtime_block )
|
24
32
|
class_or_module_set = class_or_module_include( & runtime_block )
|
25
|
-
subclass_set = cluster_stack.subclass( ModuleCluster::Define::Block::ClassOrModuleOrSubclass, runtime_block )
|
26
|
-
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, subclass_set )
|
33
|
+
subclass_set = cluster_stack.subclass( ::ModuleCluster::Define::Block::ClassOrModuleOrSubclass, __method__, runtime_block )
|
34
|
+
return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, subclass_set )
|
27
35
|
end
|
28
36
|
|
29
37
|
end
|