cascading-configuration-array 1.6.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cascading-configuration-array/CascadingConfiguration/Array/Interface.rb +16 -16
- data/lib/cascading-configuration-array/CascadingConfiguration/Array.rb +2 -2
- data/lib/cascading-configuration-array/_private_/CascadingConfiguration/Array/CompositingArray.rb +700 -124
- data/lib/cascading-configuration-array/_private_/CascadingConfiguration/Array/Interface/GettersSetters.rb +59 -37
- data/lib/cascading-configuration-array/_private_/CascadingConfiguration/Array/ModuleSupportMethods.rb +18 -15
- data/lib/cascading-configuration-array.rb +5 -5
- data/spec/CascadingConfiguration/Array_spec.rb +22 -18
- data/spec/_private_/CascadingConfiguration/Array/CompositingArray_spec.rb +903 -474
- metadata +6 -8
- data/lib/cascading-configuration-array/_private_/CascadingConfiguration/Array/CompositingArray/LocalConfigurationArray.rb +0 -192
- data/spec/_private_/CascadingConfiguration/Array/CompositingArray/LocalConfigurationArray_spec.rb +0 -155
@@ -1,15 +1,15 @@
|
|
1
1
|
|
2
|
-
module CascadingConfiguration::Array::Interface
|
2
|
+
module ::CascadingConfiguration::Array::Interface
|
3
3
|
|
4
4
|
# Support methods that define configuration settings array methods
|
5
|
-
|
6
|
-
|
5
|
+
include ::CascadingConfiguration::Array::Interface::GettersSetters
|
6
|
+
|
7
7
|
##############################
|
8
8
|
# attr_configuration_array #
|
9
9
|
##############################
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
# defines configuration in class or module
|
12
|
+
# configuration cascades downward to instance including all classes or modules in-between
|
13
13
|
def attr_configuration_array( *configuration_names )
|
14
14
|
|
15
15
|
configuration_names.each do |this_configuration_name|
|
@@ -27,8 +27,8 @@ module CascadingConfiguration::Array::Interface
|
|
27
27
|
# attr_module_configuration_array #
|
28
28
|
#####################################
|
29
29
|
|
30
|
-
|
31
|
-
|
30
|
+
# defines configuration in class or module
|
31
|
+
# configuration cascades downward to last class or module
|
32
32
|
def attr_module_configuration_array( *configuration_names )
|
33
33
|
|
34
34
|
configuration_names.each do |this_configuration_name|
|
@@ -41,17 +41,17 @@ module CascadingConfiguration::Array::Interface
|
|
41
41
|
return self
|
42
42
|
|
43
43
|
end
|
44
|
-
|
44
|
+
alias_method :attr_class_configuration_array, :attr_module_configuration_array
|
45
45
|
|
46
46
|
####################################
|
47
47
|
# attr_local_configuration_array #
|
48
48
|
####################################
|
49
49
|
|
50
|
-
|
51
|
-
|
50
|
+
# defines configuration in present class or module context
|
51
|
+
# configuration does not cascade
|
52
52
|
def attr_local_configuration_array( *configuration_names )
|
53
53
|
|
54
|
-
|
54
|
+
::CascadingConfiguration::Variable.create_local_instance_configuration_support_module( self )
|
55
55
|
|
56
56
|
configuration_names.each do |this_configuration_name|
|
57
57
|
# define configuration setter
|
@@ -68,11 +68,11 @@ module CascadingConfiguration::Array::Interface
|
|
68
68
|
# attr_object_configuration_array #
|
69
69
|
#####################################
|
70
70
|
|
71
|
-
|
72
|
-
|
71
|
+
# defines configuration in present instance
|
72
|
+
# configuration does not cascade
|
73
73
|
def attr_object_configuration_array( *configuration_names )
|
74
74
|
|
75
|
-
|
75
|
+
::CascadingConfiguration::Variable.create_local_instance_configuration_support_module( self )
|
76
76
|
|
77
77
|
configuration_names.each do |this_configuration_name|
|
78
78
|
# define configuration setter
|
@@ -89,8 +89,8 @@ module CascadingConfiguration::Array::Interface
|
|
89
89
|
# attr_instance_configuration_array #
|
90
90
|
#######################################
|
91
91
|
|
92
|
-
|
93
|
-
|
92
|
+
# defines configuration in present class or module context
|
93
|
+
# configuration does not cascade
|
94
94
|
def attr_instance_configuration_array( *configuration_names )
|
95
95
|
|
96
96
|
configuration_names.each do |this_configuration_name|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
|
-
module CascadingConfiguration::Array
|
2
|
+
module ::CascadingConfiguration::Array
|
3
3
|
|
4
4
|
# Configuration modules for storage of settings arrays
|
5
5
|
include ::CascadingConfiguration::Variable
|
6
6
|
|
7
7
|
# Interface to declare configuration settings arrays
|
8
|
-
|
8
|
+
include ::CascadingConfiguration::Array::Interface
|
9
9
|
|
10
10
|
extend ::CascadingConfiguration::Array::ModuleSupportMethods
|
11
11
|
|