module-cluster 1.4.8 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. data/README.md +127 -337
  2. data/lib/module-cluster.rb +1 -153
  3. data/lib/module/cluster.rb +341 -0
  4. data/lib/module/cluster/class_support.rb +22 -0
  5. data/lib/module/cluster/cluster.rb +10 -0
  6. data/lib/module/cluster/cluster/cluster_interface.rb +550 -0
  7. data/lib/module/cluster/exception/module_not_in_stack.rb +26 -0
  8. data/lib/module/cluster/instance_controller.rb +14 -0
  9. data/lib/module/cluster/instance_controller/hook_controller.rb +33 -0
  10. data/lib/module/cluster/instance_controller/hook_controller/chain_proxy.rb +511 -0
  11. data/lib/module/cluster/instance_controller/hook_controller/hook_controller_interface.rb +830 -0
  12. data/lib/module/cluster/instance_controller/instance_controller_interface.rb +269 -0
  13. data/lib/module/cluster/instance_controller/multiple_hook_controller_proxy.rb +359 -0
  14. data/lib/module/cluster/instance_controller/multiple_hook_controller_proxy/chain_proxy.rb +442 -0
  15. data/lib/module/cluster/module_support.rb +67 -0
  16. data/lib/module/namespaces.rb +13 -0
  17. data/lib/module/requires.rb +32 -0
  18. data/spec/module/cluster/cluster_spec.rb +473 -0
  19. data/spec/module/cluster/instance_controller/hook_controller_spec.rb +922 -0
  20. data/spec/module/cluster/instance_controller/multiple_hook_controller_proxy_spec.rb +1240 -0
  21. data/spec/module/cluster_spec.rb +1794 -0
  22. metadata +27 -98
  23. data/README.rdoc +0 -395
  24. data/lib/module-cluster/ModuleCluster.rb +0 -9
  25. data/lib/module-cluster/ModuleCluster/Define.rb +0 -12
  26. data/lib/module-cluster/ModuleCluster/Define/Block.rb +0 -9
  27. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingClass.rb +0 -83
  28. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingClassOrModule.rb +0 -70
  29. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingModule.rb +0 -79
  30. data/lib/module-cluster/ModuleCluster/Define/Block/CascadingModuleOrSubclass.rb +0 -21
  31. data/lib/module-cluster/ModuleCluster/Define/Block/Class.rb +0 -77
  32. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrInstance.rb +0 -78
  33. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModule.rb +0 -78
  34. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrInstance.rb +0 -78
  35. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrSubclass.rb +0 -36
  36. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrSubclass.rb +0 -29
  37. data/lib/module-cluster/ModuleCluster/Define/Block/Instance.rb +0 -45
  38. data/lib/module-cluster/ModuleCluster/Define/Block/Module.rb +0 -77
  39. data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrInstance.rb +0 -78
  40. data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrSubclass.rb +0 -29
  41. data/lib/module-cluster/ModuleCluster/Define/Block/Subclass.rb +0 -56
  42. data/lib/module-cluster/ModuleCluster/Define/ClassCluster.rb +0 -193
  43. data/lib/module-cluster/ModuleCluster/Define/ClassOrInstanceCluster.rb +0 -128
  44. data/lib/module-cluster/ModuleCluster/Define/Cluster.rb +0 -181
  45. data/lib/module-cluster/ModuleCluster/Define/ClusterCascades.rb +0 -185
  46. data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToClass.rb +0 -181
  47. data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToModule.rb +0 -181
  48. data/lib/module-cluster/ModuleCluster/Define/Deprecated.rb +0 -40
  49. data/lib/module-cluster/ModuleCluster/Define/InstanceCluster.rb +0 -45
  50. data/lib/module-cluster/ModuleCluster/Define/ModuleCluster.rb +0 -193
  51. data/lib/module-cluster/ModuleCluster/Define/ModuleOrClassCluster.rb +0 -209
  52. data/lib/module-cluster/ModuleCluster/Define/ModuleOrInstanceCluster.rb +0 -128
  53. data/lib/module-cluster/ModuleCluster/Define/Status.rb +0 -106
  54. data/lib/module-cluster/ModuleCluster/Suspend.rb +0 -7
  55. data/lib/module-cluster/ModuleCluster/Suspend/Hooks.rb +0 -315
  56. data/lib/module-cluster/ModuleCluster/Suspend/WithoutHooks.rb +0 -153
  57. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures.rb +0 -77
  58. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/ClusterStack.rb +0 -44
  59. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/PerformCascades.rb +0 -292
  60. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/Subclass.rb +0 -24
  61. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack.rb +0 -12
  62. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block.rb +0 -9
  63. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Class.rb +0 -36
  64. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Inherited.rb +0 -20
  65. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Instance.rb +0 -20
  66. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Module.rb +0 -36
  67. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Set.rb +0 -6
  68. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Extends.rb +0 -140
  69. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Includes.rb +0 -110
  70. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsExtends.rb +0 -140
  71. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsIncludes.rb +0 -110
  72. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Set.rb +0 -35
  73. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Set/MultiSetProxy.rb +0 -359
  74. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Status.rb +0 -55
  75. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Suspend.rb +0 -199
  76. data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade.rb +0 -34
  77. data/spec/ModuleCluster/Define/Block/CascadingClassOrModule_spec.rb +0 -285
  78. data/spec/ModuleCluster/Define/Block/CascadingClass_spec.rb +0 -254
  79. data/spec/ModuleCluster/Define/Block/CascadingModuleOrSubclass_spec.rb +0 -56
  80. data/spec/ModuleCluster/Define/Block/CascadingModule_spec.rb +0 -278
  81. data/spec/ModuleCluster/Define/Block/ClassOrInstance_spec.rb +0 -230
  82. data/spec/ModuleCluster/Define/Block/ClassOrModuleOrInstance_spec.rb +0 -238
  83. data/spec/ModuleCluster/Define/Block/ClassOrModuleOrSubclass_spec.rb +0 -54
  84. data/spec/ModuleCluster/Define/Block/ClassOrModule_spec.rb +0 -231
  85. data/spec/ModuleCluster/Define/Block/ClassOrSubclass_spec.rb +0 -54
  86. data/spec/ModuleCluster/Define/Block/Class_spec.rb +0 -224
  87. data/spec/ModuleCluster/Define/Block/Instance_spec.rb +0 -78
  88. data/spec/ModuleCluster/Define/Block/ModuleOrInstance_spec.rb +0 -54
  89. data/spec/ModuleCluster/Define/Block/ModuleOrSubclass_spec.rb +0 -51
  90. data/spec/ModuleCluster/Define/Block/Module_spec.rb +0 -230
  91. data/spec/ModuleCluster/Define/Block/Subclass_spec.rb +0 -73
  92. data/spec/ModuleCluster/Define/Block_spec.rb +0 -18
  93. data/spec/ModuleCluster/Define/ClassCluster_spec.rb +0 -728
  94. data/spec/ModuleCluster/Define/ClassOrInstanceCluster_spec.rb +0 -576
  95. data/spec/ModuleCluster/Define/ClusterCascadesToClass_spec.rb +0 -659
  96. data/spec/ModuleCluster/Define/ClusterCascadesToModule_spec.rb +0 -678
  97. data/spec/ModuleCluster/Define/ClusterCascades_spec.rb +0 -644
  98. data/spec/ModuleCluster/Define/Cluster_spec.rb +0 -708
  99. data/spec/ModuleCluster/Define/InstanceCluster_spec.rb +0 -102
  100. data/spec/ModuleCluster/Define/ModuleCluster_spec.rb +0 -728
  101. data/spec/ModuleCluster/Define/ModuleOrClassCluster_spec.rb +0 -728
  102. data/spec/ModuleCluster/Define/ModuleOrInstanceCluster_spec.rb +0 -576
  103. data/spec/ModuleCluster/Suspend/Hooks_spec.rb +0 -573
  104. data/spec/ModuleCluster/Suspend/WithoutHooks_spec.rb +0 -559
  105. data/spec/ModuleCluster_spec.rb +0 -15
  106. data/spec/_private_/ModuleCluster/CascadeFeatures/PerformCascades_spec.rb +0 -386
  107. data/spec/_private_/ModuleCluster/ClusterStack/Set/MultiSetProxy_spec.rb +0 -419
  108. data/spec/_private_/ModuleCluster/ClusterStack/Suspend_spec.rb +0 -242
@@ -1,56 +0,0 @@
1
-
2
- module ::ModuleCluster::Define::Block::Subclass
3
-
4
- include ::ModuleCluster::CascadeFeatures::ClusterStack
5
- include ::ModuleCluster::Suspend::WithoutHooks
6
-
7
- extend ::ModuleCluster::ExtendForCascade
8
-
9
- ##########################
10
- # self.should_cascade? #
11
- ##########################
12
-
13
- def self.should_cascade?( class_or_module )
14
- # cascades anyway due to nature of subclassing
15
- return true
16
- end
17
-
18
- ############################
19
- # self.should_run_block? #
20
- ############################
21
-
22
- def self.should_run_block?( hooked_instance )
23
-
24
- should_run_block = false
25
-
26
- if hooked_instance.is_a?( Module )
27
-
28
- if hooked_instance.is_a?( Class )
29
-
30
- # subclass instance
31
- if hooked_instance.ancestors[ 1 ].is_a?( Class )
32
- should_run_block = true
33
- end
34
- # class instance - don't run
35
- end
36
- # module instance - don't run
37
-
38
- end
39
-
40
- return should_run_block
41
-
42
- end
43
-
44
- ##############
45
- # subclass #
46
- ##############
47
-
48
- def subclass( & runtime_block )
49
-
50
- return cluster_stack.subclass( ::ModuleCluster::Define::Block::Subclass,
51
- __method__,
52
- runtime_block )
53
-
54
- end
55
-
56
- end
@@ -1,193 +0,0 @@
1
-
2
- module ::ModuleCluster::Define::ClassCluster
3
-
4
- include ::ModuleCluster::CascadeFeatures::ClusterStack
5
- include ::ModuleCluster::Suspend::WithoutHooks
6
-
7
- extend ::ModuleCluster::ExtendForCascade
8
-
9
- ####################################
10
- # self.should_include_or_extend? #
11
- ####################################
12
-
13
- def self.should_include_or_extend?( hooked_instance )
14
- should_include_or_extend = false
15
- if hooked_instance.is_a?( Class )
16
- should_include_or_extend = true
17
- end
18
- return should_include_or_extend
19
- end
20
-
21
- ##########################
22
- # self.should_cascade? #
23
- ##########################
24
-
25
- def self.should_cascade?( class_or_module )
26
- return false
27
- end
28
-
29
- #################################
30
- # class_include_also_includes #
31
- #################################
32
-
33
- def class_include_also_includes( *includes, & runtime_includes_block )
34
- return cluster_stack.class_include_includes( ::ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
35
- end
36
-
37
- ################################
38
- # class_include_also_extends #
39
- ################################
40
-
41
- def class_include_also_extends( *extends, & runtime_extends_block )
42
- return cluster_stack.class_include_extends( ::ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
43
- end
44
-
45
- #############################################
46
- # class_include_also_includes_and_extends #
47
- #############################################
48
-
49
- def class_include_also_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
50
- include_set = class_include_also_includes( *includes_and_extends, & runtime_includes_and_extends_block )
51
- extend_set = class_include_also_extends( *includes_and_extends, & runtime_includes_and_extends_block )
52
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
53
- end
54
-
55
- ################################
56
- # class_extend_also_includes #
57
- ################################
58
-
59
- def class_extend_also_includes( *includes, & runtime_includes_block )
60
- return cluster_stack.class_extend_includes( ::ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
61
- end
62
-
63
- ###############################
64
- # class_extend_also_extends #
65
- ###############################
66
-
67
- def class_extend_also_extends( *extends, & runtime_extends_block )
68
- return cluster_stack.class_extend_extends( ::ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
69
- end
70
-
71
- ############################################
72
- # class_extend_also_includes_and_extends #
73
- ############################################
74
-
75
- def class_extend_also_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
76
- include_set = class_extend_also_includes( *includes_and_extends, & runtime_includes_and_extends_block )
77
- extend_set = class_extend_also_extends( *includes_and_extends, & runtime_includes_and_extends_block )
78
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
79
- end
80
-
81
- #####################################
82
- # class_include_prepends_includes #
83
- #####################################
84
-
85
- def class_include_prepends_includes( *includes, & runtime_includes_block )
86
- return cluster_stack.class_include_prepends_includes( ::ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
87
- end
88
-
89
- ####################################
90
- # class_include_prepends_extends #
91
- ####################################
92
-
93
- def class_include_prepends_extends( *extends, & runtime_extends_block )
94
- return cluster_stack.class_include_prepends_extends( ::ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
95
- end
96
-
97
- #################################################
98
- # class_include_prepends_includes_and_extends #
99
- #################################################
100
-
101
- def class_include_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
102
- include_set = class_include_prepends_includes( *includes_and_extends, & runtime_includes_and_extends_block )
103
- extend_set = class_include_prepends_extends( *includes_and_extends, & runtime_includes_and_extends_block )
104
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
105
- end
106
-
107
- ####################################
108
- # class_extend_prepends_includes #
109
- ####################################
110
-
111
- def class_extend_prepends_includes( *includes, & runtime_includes_block )
112
- return cluster_stack.class_extend_prepends_includes( ::ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
113
- end
114
-
115
- ###################################
116
- # class_extend_prepends_extends #
117
- ###################################
118
-
119
- def class_extend_prepends_extends( *extends, & runtime_extends_block )
120
- return cluster_stack.class_extend_prepends_extends( ::ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
121
- end
122
-
123
- ################################################
124
- # class_extend_prepends_includes_and_extends #
125
- ################################################
126
-
127
- def class_extend_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
128
- include_set = class_extend_prepends_includes( *includes_and_extends, & runtime_includes_and_extends_block )
129
- extend_set = class_extend_prepends_extends( *includes_and_extends, & runtime_includes_and_extends_block )
130
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
131
- end
132
-
133
- ###########################################
134
- # class_include_or_extend_also_includes #
135
- ###########################################
136
-
137
- def class_include_or_extend_also_includes( *includes, & runtime_includes_block )
138
- include_set = class_include_also_includes( *includes, & runtime_includes_block )
139
- extend_set = class_extend_also_includes( *includes, & runtime_includes_block )
140
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
141
- end
142
-
143
- ##########################################
144
- # class_include_or_extend_also_extends #
145
- ##########################################
146
-
147
- def class_include_or_extend_also_extends( *extends, & runtime_extends_block )
148
- include_set = class_include_also_extends( *extends, & runtime_extends_block )
149
- extend_set = class_extend_also_extends( *extends, & runtime_extends_block )
150
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
151
- end
152
-
153
- #######################################################
154
- # class_include_or_extend_also_includes_and_extends #
155
- #######################################################
156
-
157
- def class_include_or_extend_also_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
158
- include_set = class_include_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
159
- extend_set = class_extend_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
160
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
161
- end
162
-
163
- ###############################################
164
- # class_include_or_extend_prepends_includes #
165
- ###############################################
166
-
167
- def class_include_or_extend_prepends_includes( *includes, & runtime_includes_block )
168
- include_set = class_include_prepends_includes( *includes, & runtime_includes_block )
169
- extend_set = class_extend_prepends_includes( *includes, & runtime_includes_block )
170
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
171
- end
172
-
173
- ##############################################
174
- # class_include_or_extend_prepends_extends #
175
- ##############################################
176
-
177
- def class_include_or_extend_prepends_extends( *extends, & runtime_extends_block )
178
- include_set = class_include_prepends_extends( *extends, & runtime_extends_block )
179
- extend_set = class_extend_prepends_extends( *extends, & runtime_extends_block )
180
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
181
- end
182
-
183
- ###########################################################
184
- # class_include_or_extend_prepends_includes_and_extends #
185
- ###########################################################
186
-
187
- def class_include_or_extend_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
188
- include_set = class_include_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
189
- extend_set = class_extend_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
190
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
191
- end
192
-
193
- end
@@ -1,128 +0,0 @@
1
-
2
- module ::ModuleCluster::Define::ClassOrInstanceCluster
3
-
4
- include ::ModuleCluster::CascadeFeatures::ClusterStack
5
- include ::ModuleCluster::Suspend::WithoutHooks
6
-
7
- extend ::ModuleCluster::ExtendForCascade
8
-
9
- ####################################
10
- # self.should_include_or_extend? #
11
- ####################################
12
-
13
- def self.should_include_or_extend?( hooked_instance )
14
- return hooked_instance.is_a?( Class ) || ! hooked_instance.is_a?( Module )
15
- end
16
-
17
- ##########################
18
- # self.should_cascade? #
19
- ##########################
20
-
21
- def self.should_cascade?( class_or_instance_or_module )
22
- return false
23
- end
24
-
25
- #########################################################################
26
- # class_include_or_extend_or_instance_extend_also_includes_or_extends #
27
- #########################################################################
28
-
29
- def class_include_or_extend_or_instance_extend_also_includes_or_extends( *includes_or_extends, & runtime_includes_or_extends_block )
30
- include_set = cluster_stack.class_include_includes( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
31
- extend_set = cluster_stack.class_extend_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
32
- extend_set_two = cluster_stack.instance_extend_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
33
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set, extend_set_two )
34
- end
35
-
36
- #############################################################
37
- # class_include_or_extend_or_instance_extend_also_extends #
38
- #############################################################
39
-
40
- def class_include_or_extend_or_instance_extend_also_extends( *includes_or_extends, & runtime_includes_or_extends_block )
41
- include_set = cluster_stack.class_include_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
42
- extend_set = cluster_stack.class_extend_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
43
- extend_set_two = cluster_stack.instance_extend_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
44
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set, extend_set_two )
45
- end
46
-
47
- ###############################################################
48
- # class_include_or_instance_extend_also_includes_or_extends #
49
- ###############################################################
50
-
51
- def class_include_or_instance_extend_also_includes_or_extends( *includes_or_extends, & runtime_includes_or_extends_block )
52
- include_set = cluster_stack.class_include_includes( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
53
- extend_set = cluster_stack.instance_extend_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
54
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
55
- end
56
-
57
- ###################################################
58
- # class_include_or_instance_extend_also_extends #
59
- ###################################################
60
-
61
- def class_include_or_instance_extend_also_extends( *extends, & runtime_extends_block )
62
- include_set = cluster_stack.class_include_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, extends, runtime_extends_block )
63
- extend_set = cluster_stack.instance_extend_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, extends, runtime_extends_block )
64
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
65
- end
66
-
67
- ###########################################
68
- # class_or_instance_extend_also_extends #
69
- ###########################################
70
-
71
- def class_or_instance_extend_also_extends( *extends, & runtime_extends_block )
72
- include_set = cluster_stack.class_extend_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, extends, runtime_extends_block )
73
- extend_set = cluster_stack.instance_extend_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, extends, runtime_extends_block )
74
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
75
- end
76
-
77
- #############################################################################
78
- # class_include_or_extend_or_instance_extend_prepends_includes_or_extends #
79
- #############################################################################
80
-
81
- def class_include_or_extend_or_instance_extend_prepends_includes_or_extends( *includes_or_extends, & runtime_includes_or_extends_block )
82
- include_set = cluster_stack.class_include_prepends_includes( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
83
- extend_set = cluster_stack.class_extend_prepends_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
84
- extend_set_two = cluster_stack.instance_extend_prepends_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
85
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set, extend_set_two )
86
- end
87
-
88
- ###################################################################
89
- # class_include_or_instance_extend_prepends_includes_or_extends #
90
- ###################################################################
91
-
92
- def class_include_or_instance_extend_prepends_includes_or_extends( *includes_or_extends, & runtime_includes_or_extends_block )
93
- include_set = cluster_stack.class_include_prepends_includes( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
94
- extend_set = cluster_stack.instance_extend_prepends_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
95
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
96
- end
97
-
98
- #################################################################
99
- # class_include_or_extend_or_instance_extend_prepends_extends #
100
- #################################################################
101
-
102
- def class_include_or_extend_or_instance_extend_prepends_extends( *includes_or_extends, & runtime_includes_or_extends_block )
103
- include_set = cluster_stack.class_include_prepends_includes( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
104
- extend_set = cluster_stack.instance_extend_prepends_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, includes_or_extends, runtime_includes_or_extends_block )
105
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
106
- end
107
-
108
- #######################################################
109
- # class_include_or_instance_extend_prepends_extends #
110
- #######################################################
111
-
112
- def class_include_or_instance_extend_prepends_extends( *extends, & runtime_extends_block )
113
- include_set = cluster_stack.class_include_prepends_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, extends, runtime_extends_block )
114
- extend_set = cluster_stack.instance_extend_prepends_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, extends, runtime_extends_block )
115
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
116
- end
117
-
118
- ###############################################
119
- # class_or_instance_extend_prepends_extends #
120
- ###############################################
121
-
122
- def class_or_instance_extend_prepends_extends( *extends, & runtime_extends_block )
123
- include_set = cluster_stack.class_extend_prepends_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, extends, runtime_extends_block )
124
- extend_set = cluster_stack.instance_extend_prepends_extends( ::ModuleCluster::Define::ClassOrInstanceCluster, __method__, extends, runtime_extends_block )
125
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
126
- end
127
-
128
- end
@@ -1,181 +0,0 @@
1
-
2
- module ::ModuleCluster::Define::Cluster
3
-
4
- include ::ModuleCluster::CascadeFeatures::ClusterStack
5
- include ::ModuleCluster::Suspend::WithoutHooks
6
-
7
- extend ::ModuleCluster::ExtendForCascade
8
-
9
- ####################################
10
- # self.should_include_or_extend? #
11
- ####################################
12
-
13
- def self.should_include_or_extend?( class_or_module )
14
- return true
15
- end
16
-
17
- ##########################
18
- # self.should_cascade? #
19
- ##########################
20
-
21
- def self.should_cascade?( class_or_module )
22
- return false
23
- end
24
-
25
- ###########################
26
- # include_also_includes #
27
- ###########################
28
-
29
- def include_also_includes( *includes, & runtime_includes_block )
30
- return cluster_stack.include_includes( ::ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
31
- end
32
-
33
- ##########################
34
- # include_also_extends #
35
- ##########################
36
-
37
- def include_also_extends( *extends, & runtime_extends_block )
38
- return cluster_stack.include_extends( ::ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
39
- end
40
-
41
- #######################################
42
- # include_also_includes_and_extends #
43
- #######################################
44
-
45
- def include_also_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
46
- return cluster_stack.include_includes_and_extends( ::ModuleCluster::Define::Cluster, __method__, includes_and_extends, runtime_includes_and_extends_block )
47
- end
48
-
49
- ##########################
50
- # extend_also_includes #
51
- ##########################
52
-
53
- def extend_also_includes( *includes, & runtime_includes_block )
54
- return cluster_stack.extend_includes( ::ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
55
- end
56
-
57
- #########################
58
- # extend_also_extends #
59
- #########################
60
-
61
- def extend_also_extends( *extends, & runtime_extends_block )
62
- return cluster_stack.extend_extends( ::ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
63
- end
64
-
65
- ######################################
66
- # extend_also_includes_and_extends #
67
- ######################################
68
-
69
- def extend_also_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
70
- return cluster_stack.extend_includes_and_extends( ::ModuleCluster::Define::Cluster, __method__, includes_and_extends, runtime_includes_and_extends_block )
71
- end
72
-
73
- ###############################
74
- # include_prepends_includes #
75
- ###############################
76
-
77
- def include_prepends_includes( *includes, & runtime_includes_block )
78
- return cluster_stack.include_prepends_includes( ::ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
79
- end
80
-
81
- ##############################
82
- # include_prepends_extends #
83
- ##############################
84
-
85
- def include_prepends_extends( *extends, & runtime_extends_block )
86
- return cluster_stack.include_prepends_extends( ::ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
87
- end
88
-
89
- ###########################################
90
- # include_prepends_includes_and_extends #
91
- ###########################################
92
-
93
- def include_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
94
- return cluster_stack.include_prepends_includes_and_extends( ::ModuleCluster::Define::Cluster, __method__, includes_and_extends, runtime_includes_and_extends_block )
95
- end
96
-
97
- ##############################
98
- # extend_prepends_includes #
99
- ##############################
100
-
101
- def extend_prepends_includes( *includes, & runtime_includes_block )
102
- return cluster_stack.extend_prepends_includes( ::ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
103
- end
104
-
105
- #############################
106
- # extend_prepends_extends #
107
- #############################
108
-
109
- def extend_prepends_extends( *extends, & runtime_extends_block )
110
- return cluster_stack.extend_prepends_extends( ::ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
111
- end
112
-
113
- ##########################################
114
- # extend_prepends_includes_and_extends #
115
- ##########################################
116
-
117
- def extend_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
118
- return cluster_stack.extend_prepends_includes_and_extends( ::ModuleCluster::Define::Cluster, __method__, includes_and_extends, runtime_includes_and_extends_block )
119
- end
120
-
121
- #####################################
122
- # include_or_extend_also_includes #
123
- #####################################
124
-
125
- def include_or_extend_also_includes( *includes, & runtime_includes_block )
126
- include_set = include_also_includes( *includes, & runtime_includes_block )
127
- extend_set = extend_also_includes( *includes, & runtime_includes_block )
128
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
129
- end
130
-
131
- ####################################
132
- # include_or_extend_also_extends #
133
- ####################################
134
-
135
- def include_or_extend_also_extends( *extends, & runtime_extends_block )
136
- include_set = include_also_extends( *extends, & runtime_extends_block )
137
- extend_set = extend_also_extends( *extends, & runtime_extends_block )
138
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
139
- end
140
-
141
- #################################################
142
- # include_or_extend_also_includes_and_extends #
143
- #################################################
144
-
145
- def include_or_extend_also_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
146
- include_set = include_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
147
- extend_set = extend_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
148
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
149
- end
150
-
151
- #########################################
152
- # include_or_extend_prepends_includes #
153
- #########################################
154
-
155
- def include_or_extend_prepends_includes( *includes, & runtime_includes_block )
156
- include_set = include_prepends_includes( *includes, & runtime_includes_block )
157
- extend_set = extend_prepends_includes( *includes, & runtime_includes_block )
158
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
159
- end
160
-
161
- ########################################
162
- # include_or_extend_prepends_extends #
163
- ########################################
164
-
165
- def include_or_extend_prepends_extends( *extends, & runtime_extends_block )
166
- include_set = include_prepends_extends( *extends, & runtime_extends_block )
167
- extend_set = extend_prepends_extends( *extends, & runtime_extends_block )
168
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
169
- end
170
-
171
- #####################################################
172
- # include_or_extend_prepends_includes_and_extends #
173
- #####################################################
174
-
175
- def include_or_extend_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
176
- include_set = include_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
177
- extend_set = extend_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
178
- return ::ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
179
- end
180
-
181
- end