module-cluster 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +66 -29
- data/README.rdoc +66 -29
- data/lib/module-cluster.rb +18 -0
- data/lib/module-cluster/ModuleCluster.rb +2 -7
- data/lib/module-cluster/ModuleCluster/Define/Block.rb +4 -4
- data/lib/module-cluster/ModuleCluster/Define/Block/Class.rb +11 -8
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrInstance.rb +19 -12
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModule.rb +19 -12
- data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrInstance.rb +19 -12
- data/lib/module-cluster/ModuleCluster/Define/Block/Instance.rb +3 -2
- data/lib/module-cluster/ModuleCluster/Define/Block/Module.rb +11 -8
- data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrInstance.rb +19 -12
- data/lib/module-cluster/ModuleCluster/Define/ClassCluster.rb +39 -46
- data/lib/module-cluster/ModuleCluster/Define/ClassOrInstanceCluster.rb +34 -33
- data/lib/module-cluster/ModuleCluster/Define/Cluster.rb +31 -42
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascades.rb +53 -62
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToClass.rb +49 -60
- data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToModule.rb +49 -60
- data/lib/module-cluster/ModuleCluster/Define/InstanceCluster.rb +3 -4
- data/lib/module-cluster/ModuleCluster/Define/ModuleCluster.rb +39 -46
- data/lib/module-cluster/ModuleCluster/Define/ModuleOrClassCluster.rb +55 -54
- data/lib/module-cluster/ModuleCluster/Define/ModuleOrInstanceCluster.rb +34 -33
- data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures.rb +4 -4
- data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/ClusterStack.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/PerformCascades.rb +64 -46
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack.rb +7 -5
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block.rb +3 -3
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Class.rb +2 -2
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Instance.rb +1 -1
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Module.rb +2 -2
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Set.rb +4 -1
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Extends.rb +45 -13
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Includes.rb +36 -10
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsExtends.rb +47 -15
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsIncludes.rb +38 -12
- data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Set.rb +29 -1
- data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade.rb +8 -3
- data/spec/ModuleCluster/Define/ClassCluster_spec.rb +18 -18
- data/spec/ModuleCluster/Define/ClassOrInstanceCluster_spec.rb +10 -10
- data/spec/ModuleCluster/Define/ClusterCascadesToClass_spec.rb +18 -18
- data/spec/ModuleCluster/Define/ClusterCascadesToModule_spec.rb +18 -18
- data/spec/ModuleCluster/Define/ClusterCascades_spec.rb +18 -18
- data/spec/ModuleCluster/Define/Cluster_spec.rb +18 -18
- data/spec/ModuleCluster/Define/InstanceCluster_spec.rb +2 -2
- data/spec/ModuleCluster/Define/ModuleCluster_spec.rb +18 -18
- data/spec/ModuleCluster/Define/ModuleOrClassCluster_spec.rb +18 -18
- data/spec/ModuleCluster/Define/ModuleOrInstanceCluster_spec.rb +10 -10
- data/spec/ModuleCluster_spec.rb +5 -5
- data/spec/_private_/ModuleCluster/CascadeFeatures/PerformCascades_spec.rb +110 -2
- metadata +2 -2
data/README.md
CHANGED
@@ -51,7 +51,7 @@ Blocks can be used to return dynamically-determined modules at runtime.
|
|
51
51
|
```ruby
|
52
52
|
module SomeModule
|
53
53
|
extend ModuleCluster
|
54
|
-
|
54
|
+
include_or_extend_cascades_prepend_extends do
|
55
55
|
method_that_returns_one_or_more_modules
|
56
56
|
end
|
57
57
|
end
|
@@ -61,7 +61,7 @@ Block methods can be used for nesting declarations, for instance to apply cascad
|
|
61
61
|
|
62
62
|
```ruby
|
63
63
|
prepend_module_include do |class_or_module|
|
64
|
-
class_or_module.
|
64
|
+
class_or_module.include_or_extend_cascades_prepend_extends do
|
65
65
|
method_that_returns_one_or_more_modules
|
66
66
|
end
|
67
67
|
end
|
@@ -207,18 +207,18 @@ Cascade methods (cascades to modules and classes):
|
|
207
207
|
* extend_cascades_includes
|
208
208
|
* extend_cascades_extends
|
209
209
|
* extend_cascades_includes_and_extends
|
210
|
-
*
|
211
|
-
*
|
212
|
-
*
|
213
|
-
*
|
214
|
-
*
|
215
|
-
*
|
210
|
+
* include_cascades_prepend_includes
|
211
|
+
* include_cascades_prepend_extends
|
212
|
+
* include_cascades_prepend_includes_and_extends
|
213
|
+
* extend_cascades_prepend_includes
|
214
|
+
* extend_cascades_prepend_extends
|
215
|
+
* extend_cascades_prepend_includes_and_extends
|
216
216
|
* include_or_extend_cascades_includes
|
217
217
|
* include_or_extend_cascades_extends
|
218
218
|
* include_or_extend_cascades_includes_and_extends
|
219
|
-
*
|
220
|
-
*
|
221
|
-
*
|
219
|
+
* include_or_extend_cascades_prepend_includes
|
220
|
+
* include_or_extend_cascades_prepend_extends
|
221
|
+
* include_or_extend_cascades_prepend_includes_and_extends
|
222
222
|
|
223
223
|
Cascade to class methods (does not cascade to modules):
|
224
224
|
|
@@ -228,18 +228,18 @@ Cascade to class methods (does not cascade to modules):
|
|
228
228
|
* extend_cascades_includes_to_class
|
229
229
|
* extend_cascades_extends_to_class
|
230
230
|
* extend_cascades_includes_and_extends_to_class
|
231
|
-
*
|
232
|
-
*
|
233
|
-
*
|
234
|
-
*
|
235
|
-
*
|
236
|
-
*
|
231
|
+
* include_cascades_to_class_prepend_includes
|
232
|
+
* include_cascades_to_class_prepend_extends
|
233
|
+
* include_cascades_to_class_prepend_includes_and_extends
|
234
|
+
* extend_cascades_to_class_prepend_includes
|
235
|
+
* extend_cascades_to_class_prepend_extends
|
236
|
+
* extend_cascades_to_class_prepend_includes_and_extends
|
237
237
|
* include_or_extend_cascades_includes_to_class
|
238
238
|
* include_or_extend_cascades_extends_to_class
|
239
239
|
* include_or_extend_cascades_includes_and_extends_to_class
|
240
|
-
*
|
241
|
-
*
|
242
|
-
*
|
240
|
+
* include_or_extend_cascades_to_class_prepend_includes
|
241
|
+
* include_or_extend_cascades_to_class_prepend_extends
|
242
|
+
* include_or_extend_cascades_to_class_prepend_includes_and_extends
|
243
243
|
|
244
244
|
Cascade to module methods (does not cascade to classes):
|
245
245
|
|
@@ -249,18 +249,18 @@ Cascade to module methods (does not cascade to classes):
|
|
249
249
|
* extend_cascades_includes_to_module
|
250
250
|
* extend_cascades_extends_to_module
|
251
251
|
* extend_cascades_includes_and_extends_to_module
|
252
|
-
*
|
253
|
-
*
|
254
|
-
*
|
255
|
-
*
|
256
|
-
*
|
257
|
-
*
|
252
|
+
* include_cascades_to_module_prepend_includes
|
253
|
+
* include_cascades_to_module_prepend_extends
|
254
|
+
* include_cascades_to_module_prepend_includes_and_extends
|
255
|
+
* extend_cascades_to_module_prepend_includes
|
256
|
+
* extend_cascades_to_module_prepend_extends
|
257
|
+
* extend_cascades_to_module_prepend_includes_and_extends
|
258
258
|
* include_or_extend_cascades_includes_to_module
|
259
259
|
* include_or_extend_cascades_extends_to_module
|
260
260
|
* include_or_extend_cascades_includes_and_extends_to_module
|
261
|
-
*
|
262
|
-
*
|
263
|
-
*
|
261
|
+
* include_or_extend_cascades_to_module_prepend_includes
|
262
|
+
* include_or_extend_cascades_to_module_prepend_extends
|
263
|
+
* include_or_extend_cascades_to_module_prepend_includes_and_extends
|
264
264
|
|
265
265
|
Module block methods:
|
266
266
|
|
@@ -321,6 +321,43 @@ Class or module or instance block methods:
|
|
321
321
|
* prepend_class_or_module_include_or_instance_extend
|
322
322
|
* prepend_class_or_module_include_or_extend_or_instance_extend
|
323
323
|
|
324
|
+
Suspend methods:
|
325
|
+
|
326
|
+
* suspend_any_hooks
|
327
|
+
* suspend_any_include_hooks
|
328
|
+
* suspend_any_extend_hooks
|
329
|
+
* suspend_include_hooks
|
330
|
+
* suspend_extend_hooks
|
331
|
+
* suspend_prepend_include_hooks
|
332
|
+
* suspend_prepend_extend_hooks
|
333
|
+
|
334
|
+
* hooks_suspended?
|
335
|
+
* all_hooks_suspended?
|
336
|
+
* all_include_hooks_suspended?
|
337
|
+
* all_extend_hooks_suspended?
|
338
|
+
* include_hooks_suspended?
|
339
|
+
* extend_hooks_suspended?
|
340
|
+
* prepend_include_hooks_suspended?
|
341
|
+
* prepend_extend_hooks_suspended?
|
342
|
+
|
343
|
+
* resume_any_hooks
|
344
|
+
* resume_any_include_hooks
|
345
|
+
* resume_any_extend_hooks
|
346
|
+
* resume_include_hooks
|
347
|
+
* resume_extend_hooks
|
348
|
+
* resume_prepend_include_hooks
|
349
|
+
* resume_prepend_extend_hooks
|
350
|
+
|
351
|
+
Suspend for block methods:
|
352
|
+
|
353
|
+
* without_any_hooks
|
354
|
+
* without_any_include_hooks
|
355
|
+
* without_any_extend_hooks
|
356
|
+
* without_include_hooks
|
357
|
+
* without_extend_hooks
|
358
|
+
* without_prepend_include_hooks
|
359
|
+
* without_prepend_extend_hooks
|
360
|
+
|
324
361
|
# License #
|
325
362
|
|
326
363
|
(The MIT License)
|
data/README.rdoc
CHANGED
@@ -44,7 +44,7 @@ Blocks can be used to return dynamically-determined modules at runtime.
|
|
44
44
|
|
45
45
|
module SomeModule
|
46
46
|
extend ModuleCluster
|
47
|
-
|
47
|
+
include_or_extend_cascades_prepend_extends do
|
48
48
|
method_that_returns_one_or_more_modules
|
49
49
|
end
|
50
50
|
end
|
@@ -52,7 +52,7 @@ end
|
|
52
52
|
Block methods can be used for nesting declarations, for instance to apply cascades only after first module/class:
|
53
53
|
|
54
54
|
prepend_module_include do |class_or_module|
|
55
|
-
class_or_module.
|
55
|
+
class_or_module.include_or_extend_cascades_prepend_extends do
|
56
56
|
method_that_returns_one_or_more_modules
|
57
57
|
end
|
58
58
|
end
|
@@ -197,18 +197,18 @@ Cascade methods (cascades to modules and classes):
|
|
197
197
|
* extend_cascades_includes
|
198
198
|
* extend_cascades_extends
|
199
199
|
* extend_cascades_includes_and_extends
|
200
|
-
*
|
201
|
-
*
|
202
|
-
*
|
203
|
-
*
|
204
|
-
*
|
205
|
-
*
|
200
|
+
* include_cascades_prepend_includes
|
201
|
+
* include_cascades_prepend_extends
|
202
|
+
* include_cascades_prepend_includes_and_extends
|
203
|
+
* extend_cascades_prepend_includes
|
204
|
+
* extend_cascades_prepend_extends
|
205
|
+
* extend_cascades_prepend_includes_and_extends
|
206
206
|
* include_or_extend_cascades_includes
|
207
207
|
* include_or_extend_cascades_extends
|
208
208
|
* include_or_extend_cascades_includes_and_extends
|
209
|
-
*
|
210
|
-
*
|
211
|
-
*
|
209
|
+
* include_or_extend_cascades_prepend_includes
|
210
|
+
* include_or_extend_cascades_prepend_extends
|
211
|
+
* include_or_extend_cascades_prepend_includes_and_extends
|
212
212
|
|
213
213
|
Cascade to class methods (does not cascade to modules):
|
214
214
|
|
@@ -218,18 +218,18 @@ Cascade to class methods (does not cascade to modules):
|
|
218
218
|
* extend_cascades_includes_to_class
|
219
219
|
* extend_cascades_extends_to_class
|
220
220
|
* extend_cascades_includes_and_extends_to_class
|
221
|
-
*
|
222
|
-
*
|
223
|
-
*
|
224
|
-
*
|
225
|
-
*
|
226
|
-
*
|
221
|
+
* include_cascades_to_class_prepend_includes
|
222
|
+
* include_cascades_to_class_prepend_extends
|
223
|
+
* include_cascades_to_class_prepend_includes_and_extends
|
224
|
+
* extend_cascades_to_class_prepend_includes
|
225
|
+
* extend_cascades_to_class_prepend_extends
|
226
|
+
* extend_cascades_to_class_prepend_includes_and_extends
|
227
227
|
* include_or_extend_cascades_includes_to_class
|
228
228
|
* include_or_extend_cascades_extends_to_class
|
229
229
|
* include_or_extend_cascades_includes_and_extends_to_class
|
230
|
-
*
|
231
|
-
*
|
232
|
-
*
|
230
|
+
* include_or_extend_cascades_to_class_prepend_includes
|
231
|
+
* include_or_extend_cascades_to_class_prepend_extends
|
232
|
+
* include_or_extend_cascades_to_class_prepend_includes_and_extends
|
233
233
|
|
234
234
|
Cascade to module methods (does not cascade to classes):
|
235
235
|
|
@@ -239,18 +239,18 @@ Cascade to module methods (does not cascade to classes):
|
|
239
239
|
* extend_cascades_includes_to_module
|
240
240
|
* extend_cascades_extends_to_module
|
241
241
|
* extend_cascades_includes_and_extends_to_module
|
242
|
-
*
|
243
|
-
*
|
244
|
-
*
|
245
|
-
*
|
246
|
-
*
|
247
|
-
*
|
242
|
+
* include_cascades_to_module_prepend_includes
|
243
|
+
* include_cascades_to_module_prepend_extends
|
244
|
+
* include_cascades_to_module_prepend_includes_and_extends
|
245
|
+
* extend_cascades_to_module_prepend_includes
|
246
|
+
* extend_cascades_to_module_prepend_extends
|
247
|
+
* extend_cascades_to_module_prepend_includes_and_extends
|
248
248
|
* include_or_extend_cascades_includes_to_module
|
249
249
|
* include_or_extend_cascades_extends_to_module
|
250
250
|
* include_or_extend_cascades_includes_and_extends_to_module
|
251
|
-
*
|
252
|
-
*
|
253
|
-
*
|
251
|
+
* include_or_extend_cascades_to_module_prepend_includes
|
252
|
+
* include_or_extend_cascades_to_module_prepend_extends
|
253
|
+
* include_or_extend_cascades_to_module_prepend_includes_and_extends
|
254
254
|
|
255
255
|
Module block methods:
|
256
256
|
|
@@ -311,6 +311,43 @@ Class or module or instance block methods:
|
|
311
311
|
* prepend_class_or_module_include_or_instance_extend
|
312
312
|
* prepend_class_or_module_include_or_extend_or_instance_extend
|
313
313
|
|
314
|
+
Suspend methods:
|
315
|
+
|
316
|
+
* suspend_any_hooks
|
317
|
+
* suspend_any_include_hooks
|
318
|
+
* suspend_any_extend_hooks
|
319
|
+
* suspend_include_hooks
|
320
|
+
* suspend_extend_hooks
|
321
|
+
* suspend_prepend_include_hooks
|
322
|
+
* suspend_prepend_extend_hooks
|
323
|
+
|
324
|
+
* hooks_suspended?
|
325
|
+
* all_hooks_suspended?
|
326
|
+
* all_include_hooks_suspended?
|
327
|
+
* all_extend_hooks_suspended?
|
328
|
+
* include_hooks_suspended?
|
329
|
+
* extend_hooks_suspended?
|
330
|
+
* prepend_include_hooks_suspended?
|
331
|
+
* prepend_extend_hooks_suspended?
|
332
|
+
|
333
|
+
* resume_any_hooks
|
334
|
+
* resume_any_include_hooks
|
335
|
+
* resume_any_extend_hooks
|
336
|
+
* resume_include_hooks
|
337
|
+
* resume_extend_hooks
|
338
|
+
* resume_prepend_include_hooks
|
339
|
+
* resume_prepend_extend_hooks
|
340
|
+
|
341
|
+
Suspend for block methods:
|
342
|
+
|
343
|
+
* without_any_hooks
|
344
|
+
* without_any_include_hooks
|
345
|
+
* without_any_extend_hooks
|
346
|
+
* without_include_hooks
|
347
|
+
* without_extend_hooks
|
348
|
+
* without_prepend_include_hooks
|
349
|
+
* without_prepend_extend_hooks
|
350
|
+
|
314
351
|
== License
|
315
352
|
|
316
353
|
(The MIT License)
|
data/lib/module-cluster.rb
CHANGED
@@ -9,6 +9,10 @@ module ModuleCluster
|
|
9
9
|
module Module
|
10
10
|
end
|
11
11
|
end
|
12
|
+
module Status
|
13
|
+
end
|
14
|
+
module Suspend
|
15
|
+
end
|
12
16
|
end
|
13
17
|
module CascadeFeatures
|
14
18
|
end
|
@@ -52,6 +56,12 @@ module ModuleCluster
|
|
52
56
|
module ModuleOrInstanceCluster
|
53
57
|
end
|
54
58
|
end
|
59
|
+
module Suspend
|
60
|
+
module Hooks
|
61
|
+
end
|
62
|
+
module WithoutHooks
|
63
|
+
end
|
64
|
+
end
|
55
65
|
end
|
56
66
|
|
57
67
|
|
@@ -62,6 +72,9 @@ require_relative 'module-cluster/_private_/ModuleCluster/CascadeFeatures.rb'
|
|
62
72
|
require_relative 'module-cluster/_private_/ModuleCluster/ExtendForCascade.rb'
|
63
73
|
|
64
74
|
require_relative 'module-cluster/_private_/ModuleCluster/ClusterStack/Set.rb'
|
75
|
+
require_relative 'module-cluster/_private_/ModuleCluster/ClusterStack/Set/MultiSetProxy.rb'
|
76
|
+
require_relative 'module-cluster/_private_/ModuleCluster/ClusterStack/Suspend.rb'
|
77
|
+
require_relative 'module-cluster/_private_/ModuleCluster/ClusterStack/Status.rb'
|
65
78
|
require_relative 'module-cluster/_private_/ModuleCluster/ClusterStack/Includes.rb'
|
66
79
|
require_relative 'module-cluster/_private_/ModuleCluster/ClusterStack/Extends.rb'
|
67
80
|
require_relative 'module-cluster/_private_/ModuleCluster/ClusterStack/PrependsIncludes.rb'
|
@@ -73,6 +86,10 @@ require_relative 'module-cluster/_private_/ModuleCluster/ClusterStack/Block/Modu
|
|
73
86
|
require_relative 'module-cluster/_private_/ModuleCluster/ClusterStack/Block.rb'
|
74
87
|
require_relative 'module-cluster/_private_/ModuleCluster/ClusterStack.rb'
|
75
88
|
|
89
|
+
require_relative 'module-cluster/ModuleCluster/Suspend/Hooks.rb'
|
90
|
+
require_relative 'module-cluster/ModuleCluster/Suspend/WithoutHooks.rb'
|
91
|
+
require_relative 'module-cluster/ModuleCluster/Suspend.rb'
|
92
|
+
|
76
93
|
require_relative 'module-cluster/ModuleCluster/Define/Block/Class.rb'
|
77
94
|
require_relative 'module-cluster/ModuleCluster/Define/Block/Instance.rb'
|
78
95
|
require_relative 'module-cluster/ModuleCluster/Define/Block/Module.rb'
|
@@ -95,6 +112,7 @@ require_relative 'module-cluster/ModuleCluster/Define/ClusterCascadesToModule.rb
|
|
95
112
|
|
96
113
|
require_relative 'module-cluster/ModuleCluster/Define/Deprecated.rb'
|
97
114
|
|
115
|
+
require_relative 'module-cluster/ModuleCluster/Define.rb'
|
98
116
|
|
99
117
|
require_relative 'module-cluster/ModuleCluster.rb'
|
100
118
|
|
@@ -3,12 +3,7 @@ module ModuleCluster
|
|
3
3
|
|
4
4
|
extend ModuleCluster::ExtendForCascade
|
5
5
|
|
6
|
-
include
|
7
|
-
include
|
8
|
-
include ModuleCluster::Define::ClusterCascades
|
9
|
-
include ModuleCluster::Define::ClusterCascadesToClass
|
10
|
-
include ModuleCluster::Define::ClusterCascadesToModule
|
11
|
-
|
12
|
-
include ModuleCluster::Define::Deprecated
|
6
|
+
include Define
|
7
|
+
include Suspend
|
13
8
|
|
14
9
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
|
2
2
|
module ModuleCluster::Define::Block
|
3
3
|
|
4
|
-
include
|
5
|
-
include
|
6
|
-
include
|
7
|
-
include
|
4
|
+
include ClassOrModule
|
5
|
+
include ClassOrInstance
|
6
|
+
include ClassOrModuleOrInstance
|
7
|
+
include ModuleOrInstance
|
8
8
|
|
9
9
|
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
module ModuleCluster::Define::Block::Class
|
3
3
|
|
4
4
|
include ModuleCluster::CascadeFeatures::ClusterStack
|
5
|
+
include ModuleCluster::Suspend::WithoutHooks
|
5
6
|
|
6
7
|
extend ModuleCluster::ExtendForCascade
|
7
8
|
|
@@ -18,7 +19,7 @@ module ModuleCluster::Define::Block::Class
|
|
18
19
|
###################
|
19
20
|
|
20
21
|
def class_include( & runtime_block )
|
21
|
-
cluster_stack.class_include( ModuleCluster::Define::Block::Class, runtime_block )
|
22
|
+
return cluster_stack.class_include( ModuleCluster::Define::Block::Class, runtime_block )
|
22
23
|
end
|
23
24
|
|
24
25
|
##################
|
@@ -26,7 +27,7 @@ module ModuleCluster::Define::Block::Class
|
|
26
27
|
##################
|
27
28
|
|
28
29
|
def class_extend( & runtime_block )
|
29
|
-
cluster_stack.class_extend( ModuleCluster::Define::Block::Class, runtime_block )
|
30
|
+
return cluster_stack.class_extend( ModuleCluster::Define::Block::Class, runtime_block )
|
30
31
|
end
|
31
32
|
|
32
33
|
#############################
|
@@ -34,8 +35,9 @@ module ModuleCluster::Define::Block::Class
|
|
34
35
|
#############################
|
35
36
|
|
36
37
|
def class_include_or_extend( & runtime_block )
|
37
|
-
class_include( & runtime_block )
|
38
|
-
class_extend( & runtime_block )
|
38
|
+
include_set = class_include( & runtime_block )
|
39
|
+
extend_set = class_extend( & runtime_block )
|
40
|
+
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
39
41
|
end
|
40
42
|
|
41
43
|
###########################
|
@@ -43,7 +45,7 @@ module ModuleCluster::Define::Block::Class
|
|
43
45
|
###########################
|
44
46
|
|
45
47
|
def prepend_class_include( & runtime_block )
|
46
|
-
cluster_stack.prepend_class_include( ModuleCluster::Define::Block::Class, runtime_block )
|
48
|
+
return cluster_stack.prepend_class_include( ModuleCluster::Define::Block::Class, runtime_block )
|
47
49
|
end
|
48
50
|
|
49
51
|
##########################
|
@@ -51,7 +53,7 @@ module ModuleCluster::Define::Block::Class
|
|
51
53
|
##########################
|
52
54
|
|
53
55
|
def prepend_class_extend( & runtime_block )
|
54
|
-
cluster_stack.prepend_class_extend( ModuleCluster::Define::Block::Class, runtime_block )
|
56
|
+
return cluster_stack.prepend_class_extend( ModuleCluster::Define::Block::Class, runtime_block )
|
55
57
|
end
|
56
58
|
|
57
59
|
#####################################
|
@@ -59,8 +61,9 @@ module ModuleCluster::Define::Block::Class
|
|
59
61
|
#####################################
|
60
62
|
|
61
63
|
def prepend_class_include_or_extend( & runtime_block )
|
62
|
-
prepend_class_include( & runtime_block )
|
63
|
-
prepend_class_extend( & runtime_block )
|
64
|
+
include_set = prepend_class_include( & runtime_block )
|
65
|
+
extend_set = prepend_class_extend( & runtime_block )
|
66
|
+
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
|
64
67
|
end
|
65
68
|
|
66
69
|
end
|
@@ -3,6 +3,7 @@ module ModuleCluster::Define::Block::ClassOrInstance
|
|
3
3
|
|
4
4
|
include ModuleCluster::Define::Block::Class
|
5
5
|
include ModuleCluster::Define::Block::Instance
|
6
|
+
include ModuleCluster::Suspend::WithoutHooks
|
6
7
|
|
7
8
|
extend ModuleCluster::ExtendForCascade
|
8
9
|
|
@@ -11,8 +12,9 @@ module ModuleCluster::Define::Block::ClassOrInstance
|
|
11
12
|
##############################
|
12
13
|
|
13
14
|
def class_or_instance_extend( & runtime_block )
|
14
|
-
class_extend( & runtime_block )
|
15
|
-
instance_extend( & runtime_block )
|
15
|
+
class_set = class_extend( & runtime_block )
|
16
|
+
instance_set = instance_extend( & runtime_block )
|
17
|
+
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
16
18
|
end
|
17
19
|
|
18
20
|
######################################
|
@@ -20,8 +22,9 @@ module ModuleCluster::Define::Block::ClassOrInstance
|
|
20
22
|
######################################
|
21
23
|
|
22
24
|
def class_include_or_instance_extend( & runtime_block )
|
23
|
-
class_include( & runtime_block )
|
24
|
-
instance_extend( & runtime_block )
|
25
|
+
class_set = class_include( & runtime_block )
|
26
|
+
instance_set = instance_extend( & runtime_block )
|
27
|
+
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
25
28
|
end
|
26
29
|
|
27
30
|
################################################
|
@@ -29,8 +32,9 @@ module ModuleCluster::Define::Block::ClassOrInstance
|
|
29
32
|
################################################
|
30
33
|
|
31
34
|
def class_include_or_extend_or_instance_extend( & runtime_block )
|
32
|
-
class_include_or_extend( & runtime_block )
|
33
|
-
instance_extend( & runtime_block )
|
35
|
+
class_set = class_include_or_extend( & runtime_block )
|
36
|
+
instance_set = instance_extend( & runtime_block )
|
37
|
+
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
34
38
|
end
|
35
39
|
|
36
40
|
######################################
|
@@ -38,8 +42,9 @@ module ModuleCluster::Define::Block::ClassOrInstance
|
|
38
42
|
######################################
|
39
43
|
|
40
44
|
def prepend_class_or_instance_extend( & runtime_block )
|
41
|
-
prepend_class_extend( & runtime_block )
|
42
|
-
prepend_instance_extend( & runtime_block )
|
45
|
+
class_set = prepend_class_extend( & runtime_block )
|
46
|
+
instance_set = prepend_instance_extend( & runtime_block )
|
47
|
+
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
43
48
|
end
|
44
49
|
|
45
50
|
##############################################
|
@@ -47,8 +52,9 @@ module ModuleCluster::Define::Block::ClassOrInstance
|
|
47
52
|
##############################################
|
48
53
|
|
49
54
|
def prepend_class_include_or_instance_extend( & runtime_block )
|
50
|
-
prepend_class_include( & runtime_block )
|
51
|
-
prepend_instance_extend( & runtime_block )
|
55
|
+
class_set = prepend_class_include( & runtime_block )
|
56
|
+
instance_set = prepend_instance_extend( & runtime_block )
|
57
|
+
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
52
58
|
end
|
53
59
|
|
54
60
|
########################################################
|
@@ -56,8 +62,9 @@ module ModuleCluster::Define::Block::ClassOrInstance
|
|
56
62
|
########################################################
|
57
63
|
|
58
64
|
def prepend_class_include_or_extend_or_instance_extend( & runtime_block )
|
59
|
-
prepend_class_include_or_extend( & runtime_block )
|
60
|
-
prepend_instance_extend( & runtime_block )
|
65
|
+
class_set = prepend_class_include_or_extend( & runtime_block )
|
66
|
+
instance_set = prepend_instance_extend( & runtime_block )
|
67
|
+
return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, instance_set )
|
61
68
|
end
|
62
69
|
|
63
70
|
end
|