module-cluster 1.3.5 → 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -129,7 +129,6 @@ module ModuleCluster::CascadeFeatures
129
129
  else
130
130
 
131
131
  class_or_module.instance_eval do
132
- extend( *cascade_struct.includes.reverse ) unless cascade_struct.includes.empty?
133
132
  extend( *cascade_struct.extends.reverse ) unless cascade_struct.extends.empty?
134
133
  end
135
134
 
@@ -21,23 +21,12 @@ module ModuleCluster::Define::ClusterCascades
21
21
  return true
22
22
  end
23
23
 
24
- #######################################
25
- # self.perform_includes_and_extends #
26
- #######################################
27
-
28
- def self.perform_includes_and_extends( class_or_module, set_stack )
29
- class_or_module.module_eval do
30
- include( *cascade_struct.includes.reverse ) unless includes.empty?
31
- extend( *cascade_struct.extends.reverse ) unless extends.empty?
32
- end
33
- end
34
-
35
24
  ###########################
36
25
  # self.perform_cascades #
37
26
  ###########################
38
27
 
39
28
  def self.perform_cascades( class_or_module, method, modules )
40
- class_or_module.module_eval do
29
+ class_or_module.instance_eval do
41
30
  unless is_a?( Class )
42
31
  extend ModuleCluster::Define::ClusterCascades
43
32
  __send__( method, *modules )
@@ -26,7 +26,7 @@ module ModuleCluster::Define::ClusterCascadesToClass
26
26
  ###########################
27
27
 
28
28
  def self.perform_cascades( class_or_module, method, modules )
29
- class_or_module.module_eval do
29
+ class_or_module.instance_eval do
30
30
  unless is_a?( Class )
31
31
  extend ModuleCluster::Define::ClusterCascadesToClass
32
32
  __send__( method, *modules )
@@ -26,7 +26,7 @@ module ModuleCluster::Define::ClusterCascadesToModule
26
26
  ###########################
27
27
 
28
28
  def self.perform_cascades( class_or_module, method, modules )
29
- class_or_module.module_eval do
29
+ class_or_module.instance_eval do
30
30
  unless is_a?( Class )
31
31
  extend ModuleCluster::Define::ClusterCascadesToModule
32
32
  __send__( method, *modules )
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: module-cluster
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.3.5
5
+ version: 1.3.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Asher
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-25 00:00:00 Z
13
+ date: 2011-10-18 00:00:00 Z
14
14
  dependencies: []
15
15
 
16
16
  description: "Provides methods for clustering modules so that when the main module is included other modules are also included or extended, either before or after the main module. There are currently three variants: cluster, cascade, cascade to class. Cluster causes the next module to be affected. Cascade causes all subsequent modules to be affected. Cascade to class causes the first including/extending class to be affected, but not any modules prior to it (although the effects will cascade through those unaffected modules)."
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  requirements: []
75
75
 
76
76
  rubyforge_project: module-cluster
77
- rubygems_version: 1.8.7
77
+ rubygems_version: 1.8.10
78
78
  signing_key:
79
79
  specification_version: 3
80
80
  summary: "Adds methods for defining module clusters using #included, #extended, #append_features, and #extend_object."