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.
Files changed (50) hide show
  1. data/README.md +66 -29
  2. data/README.rdoc +66 -29
  3. data/lib/module-cluster.rb +18 -0
  4. data/lib/module-cluster/ModuleCluster.rb +2 -7
  5. data/lib/module-cluster/ModuleCluster/Define/Block.rb +4 -4
  6. data/lib/module-cluster/ModuleCluster/Define/Block/Class.rb +11 -8
  7. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrInstance.rb +19 -12
  8. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModule.rb +19 -12
  9. data/lib/module-cluster/ModuleCluster/Define/Block/ClassOrModuleOrInstance.rb +19 -12
  10. data/lib/module-cluster/ModuleCluster/Define/Block/Instance.rb +3 -2
  11. data/lib/module-cluster/ModuleCluster/Define/Block/Module.rb +11 -8
  12. data/lib/module-cluster/ModuleCluster/Define/Block/ModuleOrInstance.rb +19 -12
  13. data/lib/module-cluster/ModuleCluster/Define/ClassCluster.rb +39 -46
  14. data/lib/module-cluster/ModuleCluster/Define/ClassOrInstanceCluster.rb +34 -33
  15. data/lib/module-cluster/ModuleCluster/Define/Cluster.rb +31 -42
  16. data/lib/module-cluster/ModuleCluster/Define/ClusterCascades.rb +53 -62
  17. data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToClass.rb +49 -60
  18. data/lib/module-cluster/ModuleCluster/Define/ClusterCascadesToModule.rb +49 -60
  19. data/lib/module-cluster/ModuleCluster/Define/InstanceCluster.rb +3 -4
  20. data/lib/module-cluster/ModuleCluster/Define/ModuleCluster.rb +39 -46
  21. data/lib/module-cluster/ModuleCluster/Define/ModuleOrClassCluster.rb +55 -54
  22. data/lib/module-cluster/ModuleCluster/Define/ModuleOrInstanceCluster.rb +34 -33
  23. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures.rb +4 -4
  24. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/ClusterStack.rb +1 -1
  25. data/lib/module-cluster/_private_/ModuleCluster/CascadeFeatures/PerformCascades.rb +64 -46
  26. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack.rb +7 -5
  27. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block.rb +3 -3
  28. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Class.rb +2 -2
  29. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Instance.rb +1 -1
  30. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Module.rb +2 -2
  31. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Block/Set.rb +4 -1
  32. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Extends.rb +45 -13
  33. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Includes.rb +36 -10
  34. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsExtends.rb +47 -15
  35. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/PrependsIncludes.rb +38 -12
  36. data/lib/module-cluster/_private_/ModuleCluster/ClusterStack/Set.rb +29 -1
  37. data/lib/module-cluster/_private_/ModuleCluster/ExtendForCascade.rb +8 -3
  38. data/spec/ModuleCluster/Define/ClassCluster_spec.rb +18 -18
  39. data/spec/ModuleCluster/Define/ClassOrInstanceCluster_spec.rb +10 -10
  40. data/spec/ModuleCluster/Define/ClusterCascadesToClass_spec.rb +18 -18
  41. data/spec/ModuleCluster/Define/ClusterCascadesToModule_spec.rb +18 -18
  42. data/spec/ModuleCluster/Define/ClusterCascades_spec.rb +18 -18
  43. data/spec/ModuleCluster/Define/Cluster_spec.rb +18 -18
  44. data/spec/ModuleCluster/Define/InstanceCluster_spec.rb +2 -2
  45. data/spec/ModuleCluster/Define/ModuleCluster_spec.rb +18 -18
  46. data/spec/ModuleCluster/Define/ModuleOrClassCluster_spec.rb +18 -18
  47. data/spec/ModuleCluster/Define/ModuleOrInstanceCluster_spec.rb +10 -10
  48. data/spec/ModuleCluster_spec.rb +5 -5
  49. data/spec/_private_/ModuleCluster/CascadeFeatures/PerformCascades_spec.rb +110 -2
  50. metadata +2 -2
@@ -3,6 +3,7 @@ module ModuleCluster::Define::Block::ClassOrModule
3
3
 
4
4
  include ModuleCluster::Define::Block::Class
5
5
  include ModuleCluster::Define::Block::Module
6
+ include ModuleCluster::Suspend::WithoutHooks
6
7
 
7
8
  extend ModuleCluster::ExtendForCascade
8
9
 
@@ -11,8 +12,9 @@ module ModuleCluster::Define::Block::ClassOrModule
11
12
  #############################
12
13
 
13
14
  def class_or_module_include( & runtime_block )
14
- class_include( & runtime_block )
15
- module_include( & runtime_block )
15
+ class_set = class_include( & runtime_block )
16
+ module_set = module_include( & runtime_block )
17
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
16
18
  end
17
19
 
18
20
  ############################
@@ -20,8 +22,9 @@ module ModuleCluster::Define::Block::ClassOrModule
20
22
  ############################
21
23
 
22
24
  def class_or_module_extend( & runtime_block )
23
- class_extend( & runtime_block )
24
- module_extend( & runtime_block )
25
+ class_set = class_extend( & runtime_block )
26
+ module_set = module_extend( & runtime_block )
27
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
25
28
  end
26
29
 
27
30
  #######################################
@@ -29,8 +32,9 @@ module ModuleCluster::Define::Block::ClassOrModule
29
32
  #######################################
30
33
 
31
34
  def class_or_module_include_or_extend( & runtime_block )
32
- class_or_module_include( & runtime_block )
33
- class_or_module_extend( & runtime_block )
35
+ include_set = class_or_module_include( & runtime_block )
36
+ extend_set = class_or_module_extend( & runtime_block )
37
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
34
38
  end
35
39
 
36
40
  #####################################
@@ -38,8 +42,9 @@ module ModuleCluster::Define::Block::ClassOrModule
38
42
  #####################################
39
43
 
40
44
  def prepend_class_or_module_include( & runtime_block )
41
- prepend_class_include( & runtime_block )
42
- prepend_module_include( & runtime_block )
45
+ class_set = prepend_class_include( & runtime_block )
46
+ module_set = prepend_module_include( & runtime_block )
47
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
43
48
  end
44
49
 
45
50
  ####################################
@@ -47,8 +52,9 @@ module ModuleCluster::Define::Block::ClassOrModule
47
52
  ####################################
48
53
 
49
54
  def prepend_class_or_module_extend( & runtime_block )
50
- prepend_class_extend( & runtime_block )
51
- prepend_module_extend( & runtime_block )
55
+ class_set = prepend_class_extend( & runtime_block )
56
+ module_set = prepend_module_extend( & runtime_block )
57
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_set, module_set )
52
58
  end
53
59
 
54
60
  ###############################################
@@ -56,8 +62,9 @@ module ModuleCluster::Define::Block::ClassOrModule
56
62
  ###############################################
57
63
 
58
64
  def prepend_class_or_module_include_or_extend( & runtime_block )
59
- prepend_class_or_module_include( & runtime_block )
60
- prepend_class_or_module_extend( & runtime_block )
65
+ include_set = prepend_class_or_module_include( & runtime_block )
66
+ extend_set = prepend_class_or_module_extend( & runtime_block )
67
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( include_set, extend_set )
61
68
  end
62
69
 
63
70
  end
@@ -3,6 +3,7 @@ module ModuleCluster::Define::Block::ClassOrModuleOrInstance
3
3
 
4
4
  include ModuleCluster::Define::Block::ClassOrModule
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::ClassOrModuleOrInstance
11
12
  ########################################
12
13
 
13
14
  def class_or_module_or_instance_extend( & runtime_block )
14
- class_or_module_extend( & runtime_block )
15
- instance_extend( & runtime_block )
15
+ class_or_module_set = class_or_module_extend( & runtime_block )
16
+ instance_set = instance_extend( & runtime_block )
17
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
16
18
  end
17
19
 
18
20
  ################################################
@@ -20,8 +22,9 @@ module ModuleCluster::Define::Block::ClassOrModuleOrInstance
20
22
  ################################################
21
23
 
22
24
  def class_or_module_include_or_instance_extend( & runtime_block )
23
- class_or_module_include( & runtime_block )
24
- instance_extend( & runtime_block )
25
+ class_or_module_set = class_or_module_include( & runtime_block )
26
+ instance_set = instance_extend( & runtime_block )
27
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
25
28
  end
26
29
 
27
30
  ##########################################################
@@ -29,8 +32,9 @@ module ModuleCluster::Define::Block::ClassOrModuleOrInstance
29
32
  ##########################################################
30
33
 
31
34
  def class_or_module_include_or_extend_or_instance_extend( & runtime_block )
32
- class_or_module_include_or_extend( & runtime_block )
33
- instance_extend( & runtime_block )
35
+ class_or_module_set = class_or_module_include_or_extend( & runtime_block )
36
+ instance_set = instance_extend( & runtime_block )
37
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
34
38
  end
35
39
 
36
40
  ################################################
@@ -38,8 +42,9 @@ module ModuleCluster::Define::Block::ClassOrModuleOrInstance
38
42
  ################################################
39
43
 
40
44
  def prepend_class_or_module_or_instance_extend( & runtime_block )
41
- prepend_class_or_module_extend( & runtime_block )
42
- prepend_instance_extend( & runtime_block )
45
+ class_or_module_set = prepend_class_or_module_extend( & runtime_block )
46
+ instance_set = prepend_instance_extend( & runtime_block )
47
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
43
48
  end
44
49
 
45
50
  ########################################################
@@ -47,8 +52,9 @@ module ModuleCluster::Define::Block::ClassOrModuleOrInstance
47
52
  ########################################################
48
53
 
49
54
  def prepend_class_or_module_include_or_instance_extend( & runtime_block )
50
- prepend_class_or_module_include( & runtime_block )
51
- prepend_instance_extend( & runtime_block )
55
+ class_or_module_set = prepend_class_or_module_include( & runtime_block )
56
+ instance_set = prepend_instance_extend( & runtime_block )
57
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
52
58
  end
53
59
 
54
60
  ##################################################################
@@ -56,8 +62,9 @@ module ModuleCluster::Define::Block::ClassOrModuleOrInstance
56
62
  ##################################################################
57
63
 
58
64
  def prepend_class_or_module_include_or_extend_or_instance_extend( & runtime_block )
59
- prepend_class_or_module_include_or_extend( & runtime_block )
60
- prepend_instance_extend( & runtime_block )
65
+ class_or_module_set = prepend_class_or_module_include_or_extend( & runtime_block )
66
+ instance_set = prepend_instance_extend( & runtime_block )
67
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( class_or_module_set, instance_set )
61
68
  end
62
69
 
63
70
  end
@@ -2,6 +2,7 @@
2
2
  module ModuleCluster::Define::Block::Instance
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::Instance
18
19
  #####################
19
20
 
20
21
  def instance_extend( & runtime_block )
21
- cluster_stack.instance_extend( ModuleCluster::Define::Block::Instance, runtime_block )
22
+ return cluster_stack.instance_extend( ModuleCluster::Define::Block::Instance, runtime_block )
22
23
  end
23
24
 
24
25
  #############################
@@ -26,7 +27,7 @@ module ModuleCluster::Define::Block::Instance
26
27
  #############################
27
28
 
28
29
  def prepend_instance_extend( & runtime_block )
29
- cluster_stack.prepend_instance_extend( ModuleCluster::Define::Block::Instance, runtime_block )
30
+ return cluster_stack.prepend_instance_extend( ModuleCluster::Define::Block::Instance, runtime_block )
30
31
  end
31
32
 
32
33
  end
@@ -2,6 +2,7 @@
2
2
  module ModuleCluster::Define::Block::Module
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::Module
18
19
  ####################
19
20
 
20
21
  def module_include( & runtime_block )
21
- cluster_stack.module_include( ModuleCluster::Define::Block::Module, runtime_block )
22
+ return cluster_stack.module_include( ModuleCluster::Define::Block::Module, runtime_block )
22
23
  end
23
24
 
24
25
  ###################
@@ -26,7 +27,7 @@ module ModuleCluster::Define::Block::Module
26
27
  ###################
27
28
 
28
29
  def module_extend( & runtime_block )
29
- cluster_stack.module_extend( ModuleCluster::Define::Block::Module, runtime_block )
30
+ return cluster_stack.module_extend( ModuleCluster::Define::Block::Module, runtime_block )
30
31
  end
31
32
 
32
33
  ##############################
@@ -34,8 +35,9 @@ module ModuleCluster::Define::Block::Module
34
35
  ##############################
35
36
 
36
37
  def module_include_or_extend( & runtime_block )
37
- module_include( & runtime_block )
38
- module_extend( & runtime_block )
38
+ include_set = module_include( & runtime_block )
39
+ extend_set = module_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::Module
43
45
  ############################
44
46
 
45
47
  def prepend_module_include( & runtime_block )
46
- cluster_stack.prepend_module_include( ModuleCluster::Define::Block::Module, runtime_block )
48
+ return cluster_stack.prepend_module_include( ModuleCluster::Define::Block::Module, runtime_block )
47
49
  end
48
50
 
49
51
  ###########################
@@ -51,7 +53,7 @@ module ModuleCluster::Define::Block::Module
51
53
  ###########################
52
54
 
53
55
  def prepend_module_extend( & runtime_block )
54
- cluster_stack.prepend_module_extend( ModuleCluster::Define::Block::Module, runtime_block )
56
+ return cluster_stack.prepend_module_extend( ModuleCluster::Define::Block::Module, runtime_block )
55
57
  end
56
58
 
57
59
  ######################################
@@ -59,8 +61,9 @@ module ModuleCluster::Define::Block::Module
59
61
  ######################################
60
62
 
61
63
  def prepend_module_include_or_extend( & runtime_block )
62
- prepend_module_include( & runtime_block )
63
- prepend_module_extend( & runtime_block )
64
+ include_set = prepend_module_include( & runtime_block )
65
+ extend_set = prepend_module_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::ModuleOrInstance
3
3
 
4
4
  include ModuleCluster::Define::Block::Module
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::ModuleOrInstance
11
12
  ###############################
12
13
 
13
14
  def module_or_instance_extend( & runtime_block )
14
- module_extend( & runtime_block )
15
- instance_extend( & runtime_block )
15
+ module_set = module_extend( & runtime_block )
16
+ instance_set = instance_extend( & runtime_block )
17
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( module_set, instance_set )
16
18
  end
17
19
 
18
20
  #######################################
@@ -20,8 +22,9 @@ module ModuleCluster::Define::Block::ModuleOrInstance
20
22
  #######################################
21
23
 
22
24
  def module_include_or_instance_extend( & runtime_block )
23
- module_include( & runtime_block )
24
- instance_extend( & runtime_block )
25
+ module_set = module_include( & runtime_block )
26
+ instance_set = instance_extend( & runtime_block )
27
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( module_set, instance_set )
25
28
  end
26
29
 
27
30
  #################################################
@@ -29,8 +32,9 @@ module ModuleCluster::Define::Block::ModuleOrInstance
29
32
  #################################################
30
33
 
31
34
  def module_include_or_extend_or_instance_extend( & runtime_block )
32
- module_include_or_extend( & runtime_block )
33
- instance_extend( & runtime_block )
35
+ module_set = module_include_or_extend( & runtime_block )
36
+ instance_set = instance_extend( & runtime_block )
37
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( module_set, instance_set )
34
38
  end
35
39
 
36
40
  #######################################
@@ -38,8 +42,9 @@ module ModuleCluster::Define::Block::ModuleOrInstance
38
42
  #######################################
39
43
 
40
44
  def prepend_module_or_instance_extend( & runtime_block )
41
- prepend_module_extend( & runtime_block )
42
- prepend_instance_extend( & runtime_block )
45
+ module_set = prepend_module_extend( & runtime_block )
46
+ instance_set = prepend_instance_extend( & runtime_block )
47
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( module_set, instance_set )
43
48
  end
44
49
 
45
50
  ###############################################
@@ -47,8 +52,9 @@ module ModuleCluster::Define::Block::ModuleOrInstance
47
52
  ###############################################
48
53
 
49
54
  def prepend_module_include_or_instance_extend( & runtime_block )
50
- prepend_module_include( & runtime_block )
51
- prepend_instance_extend( & runtime_block )
55
+ module_set = prepend_module_include( & runtime_block )
56
+ instance_set = prepend_instance_extend( & runtime_block )
57
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( module_set, instance_set )
52
58
  end
53
59
 
54
60
  #########################################################
@@ -56,8 +62,9 @@ module ModuleCluster::Define::Block::ModuleOrInstance
56
62
  #########################################################
57
63
 
58
64
  def prepend_module_include_or_extend_or_instance_extend( & runtime_block )
59
- prepend_module_include_or_extend( & runtime_block )
60
- prepend_instance_extend( & runtime_block )
65
+ module_set = prepend_module_include_or_extend( & runtime_block )
66
+ instance_set = prepend_instance_extend( & runtime_block )
67
+ return ModuleCluster::ClusterStack::Set::MultiSetProxy.new( module_set, instance_set )
61
68
  end
62
69
 
63
70
  end
@@ -2,6 +2,7 @@
2
2
  module ModuleCluster::Define::ClassCluster
3
3
 
4
4
  include ModuleCluster::CascadeFeatures::ClusterStack
5
+ include ModuleCluster::Suspend::WithoutHooks
5
6
 
6
7
  extend ModuleCluster::ExtendForCascade
7
8
 
@@ -30,8 +31,7 @@ module ModuleCluster::Define::ClassCluster
30
31
  #################################
31
32
 
32
33
  def class_include_also_includes( *includes, & runtime_includes_block )
33
- cluster_stack.class_include_includes( ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
34
- return self
34
+ return cluster_stack.class_include_includes( ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
35
35
  end
36
36
 
37
37
  ################################
@@ -39,8 +39,7 @@ module ModuleCluster::Define::ClassCluster
39
39
  ################################
40
40
 
41
41
  def class_include_also_extends( *extends, & runtime_extends_block )
42
- cluster_stack.class_include_extends( ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
43
- return self
42
+ return cluster_stack.class_include_extends( ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
44
43
  end
45
44
 
46
45
  #############################################
@@ -48,9 +47,9 @@ module ModuleCluster::Define::ClassCluster
48
47
  #############################################
49
48
 
50
49
  def class_include_also_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
51
- class_include_also_includes( *includes_and_extends, & runtime_includes_and_extends_block )
52
- class_include_also_extends( *includes_and_extends, & runtime_includes_and_extends_block )
53
- return self
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 )
54
53
  end
55
54
 
56
55
  ################################
@@ -58,8 +57,7 @@ module ModuleCluster::Define::ClassCluster
58
57
  ################################
59
58
 
60
59
  def class_extend_also_includes( *includes, & runtime_includes_block )
61
- cluster_stack.class_extend_includes( ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
62
- return self
60
+ return cluster_stack.class_extend_includes( ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
63
61
  end
64
62
 
65
63
  ###############################
@@ -67,8 +65,7 @@ module ModuleCluster::Define::ClassCluster
67
65
  ###############################
68
66
 
69
67
  def class_extend_also_extends( *extends, & runtime_extends_block )
70
- cluster_stack.class_extend_extends( ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
71
- return self
68
+ return cluster_stack.class_extend_extends( ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
72
69
  end
73
70
 
74
71
  ############################################
@@ -76,9 +73,9 @@ module ModuleCluster::Define::ClassCluster
76
73
  ############################################
77
74
 
78
75
  def class_extend_also_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
79
- class_extend_also_includes( *includes_and_extends, & runtime_includes_and_extends_block )
80
- class_extend_also_extends( *includes_and_extends, & runtime_includes_and_extends_block )
81
- return self
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 )
82
79
  end
83
80
 
84
81
  #####################################
@@ -86,8 +83,7 @@ module ModuleCluster::Define::ClassCluster
86
83
  #####################################
87
84
 
88
85
  def class_include_prepends_includes( *includes, & runtime_includes_block )
89
- cluster_stack.class_include_prepends_includes( ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
90
- return self
86
+ return cluster_stack.class_include_prepends_includes( ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
91
87
  end
92
88
 
93
89
  ####################################
@@ -95,8 +91,7 @@ module ModuleCluster::Define::ClassCluster
95
91
  ####################################
96
92
 
97
93
  def class_include_prepends_extends( *extends, & runtime_extends_block )
98
- cluster_stack.class_include_prepends_extends( ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
99
- return self
94
+ return cluster_stack.class_include_prepends_extends( ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
100
95
  end
101
96
 
102
97
  #################################################
@@ -104,9 +99,9 @@ module ModuleCluster::Define::ClassCluster
104
99
  #################################################
105
100
 
106
101
  def class_include_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
107
- class_include_prepends_includes( *includes_and_extends, & runtime_includes_and_extends_block )
108
- class_include_prepends_extends( *includes_and_extends, & runtime_includes_and_extends_block )
109
- return self
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 )
110
105
  end
111
106
 
112
107
  ####################################
@@ -114,8 +109,7 @@ module ModuleCluster::Define::ClassCluster
114
109
  ####################################
115
110
 
116
111
  def class_extend_prepends_includes( *includes, & runtime_includes_block )
117
- cluster_stack.class_extend_prepends_includes( ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
118
- return self
112
+ return cluster_stack.class_extend_prepends_includes( ModuleCluster::Define::Cluster, __method__, includes, runtime_includes_block )
119
113
  end
120
114
 
121
115
  ###################################
@@ -123,8 +117,7 @@ module ModuleCluster::Define::ClassCluster
123
117
  ###################################
124
118
 
125
119
  def class_extend_prepends_extends( *extends, & runtime_extends_block )
126
- cluster_stack.class_extend_prepends_extends( ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
127
- return self
120
+ return cluster_stack.class_extend_prepends_extends( ModuleCluster::Define::Cluster, __method__, extends, runtime_extends_block )
128
121
  end
129
122
 
130
123
  ################################################
@@ -132,9 +125,9 @@ module ModuleCluster::Define::ClassCluster
132
125
  ################################################
133
126
 
134
127
  def class_extend_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
135
- class_extend_prepends_includes( *includes_and_extends, & runtime_includes_and_extends_block )
136
- class_extend_prepends_extends( *includes_and_extends, & runtime_includes_and_extends_block )
137
- return self
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 )
138
131
  end
139
132
 
140
133
  ###########################################
@@ -142,9 +135,9 @@ module ModuleCluster::Define::ClassCluster
142
135
  ###########################################
143
136
 
144
137
  def class_include_or_extend_also_includes( *includes, & runtime_includes_block )
145
- class_include_also_includes( *includes, & runtime_includes_block )
146
- class_extend_also_includes( *includes, & runtime_includes_block )
147
- return self
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 )
148
141
  end
149
142
 
150
143
  ##########################################
@@ -152,9 +145,9 @@ module ModuleCluster::Define::ClassCluster
152
145
  ##########################################
153
146
 
154
147
  def class_include_or_extend_also_extends( *extends, & runtime_extends_block )
155
- class_include_also_extends( *extends, & runtime_extends_block )
156
- class_extend_also_extends( *extends, & runtime_extends_block )
157
- return self
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 )
158
151
  end
159
152
 
160
153
  #######################################################
@@ -162,9 +155,9 @@ module ModuleCluster::Define::ClassCluster
162
155
  #######################################################
163
156
 
164
157
  def class_include_or_extend_also_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
165
- class_include_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
166
- class_extend_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
167
- return self
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 )
168
161
  end
169
162
 
170
163
  ###############################################
@@ -172,9 +165,9 @@ module ModuleCluster::Define::ClassCluster
172
165
  ###############################################
173
166
 
174
167
  def class_include_or_extend_prepends_includes( *includes, & runtime_includes_block )
175
- class_include_prepends_includes( *includes, & runtime_includes_block )
176
- class_extend_prepends_includes( *includes, & runtime_includes_block )
177
- return self
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 )
178
171
  end
179
172
 
180
173
  ##############################################
@@ -182,9 +175,9 @@ module ModuleCluster::Define::ClassCluster
182
175
  ##############################################
183
176
 
184
177
  def class_include_or_extend_prepends_extends( *extends, & runtime_extends_block )
185
- class_include_prepends_extends( *extends, & runtime_extends_block )
186
- class_extend_prepends_extends( *extends, & runtime_extends_block )
187
- return self
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 )
188
181
  end
189
182
 
190
183
  ###########################################################
@@ -192,9 +185,9 @@ module ModuleCluster::Define::ClassCluster
192
185
  ###########################################################
193
186
 
194
187
  def class_include_or_extend_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
195
- class_include_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
196
- class_extend_prepends_includes_and_extends( *includes_and_extends, & runtime_includes_and_extends_block )
197
- return self
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 )
198
191
  end
199
192
 
200
193
  end