array-unique-compositing 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +0 -4
- data/README.rdoc +0 -0
- data/lib/array/unique/compositing.rb +2 -6
- data/lib/array/unique/compositing/array_interface.rb +22 -0
- metadata +3 -2
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
ADDED
File without changes
|
@@ -1,6 +1,8 @@
|
|
1
1
|
|
2
2
|
require 'array/unique'
|
3
3
|
require 'array/compositing'
|
4
|
+
#require_relative '../../../../../hooked_objects/array-unique/lib/array-unique.rb'
|
5
|
+
#require_relative '../../../../array-compositing/lib/array/compositing.rb'
|
4
6
|
|
5
7
|
# namespaces that have to be declared ahead of time for proper load order
|
6
8
|
require_relative './namespaces'
|
@@ -10,12 +12,6 @@ require_relative './requires.rb'
|
|
10
12
|
|
11
13
|
class ::Array::Unique::Compositing < ::Array::Hooked
|
12
14
|
|
13
|
-
alias_method :non_cascading_set, :[]=
|
14
|
-
|
15
|
-
alias_method :non_cascading_insert, :insert
|
16
|
-
|
17
|
-
alias_method :non_cascading_delete_at, :delete_at
|
18
|
-
|
19
15
|
include ::Array::Unique::Compositing::ArrayInterface
|
20
16
|
|
21
17
|
end
|
@@ -6,6 +6,28 @@ module ::Array::Unique::Compositing::ArrayInterface
|
|
6
6
|
|
7
7
|
instances_identify_as!( ::Array::Unique::Compositing )
|
8
8
|
|
9
|
+
extend ::Module::Cluster
|
10
|
+
|
11
|
+
cluster( :unique_compositing_array_interface ).before_include.cascade_to( :class ) do |hooked_instance|
|
12
|
+
|
13
|
+
hooked_instance.class_eval do
|
14
|
+
|
15
|
+
unless method_defined?( :unique_set )
|
16
|
+
alias_method :unique_set, :[]=
|
17
|
+
end
|
18
|
+
|
19
|
+
unless method_defined?( :unique_insert )
|
20
|
+
alias_method :unique_insert, :insert
|
21
|
+
end
|
22
|
+
|
23
|
+
unless method_defined?( :unique_delete_at )
|
24
|
+
alias_method :unique_delete_at, :delete_at
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
|
9
31
|
#########
|
10
32
|
# []= #
|
11
33
|
#########
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: array-unique-compositing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -59,6 +59,7 @@ files:
|
|
59
59
|
- lib/array-unique-compositing.rb
|
60
60
|
- spec/array/unique/compositing_spec.rb
|
61
61
|
- README.md
|
62
|
+
- README.rdoc
|
62
63
|
- CHANGELOG.rdoc
|
63
64
|
homepage: http://rubygems.org/gems/array-unique-compositing
|
64
65
|
licenses: []
|
@@ -71,7 +72,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
71
72
|
requirements:
|
72
73
|
- - ! '>='
|
73
74
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
75
|
+
version: '0'
|
75
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
77
|
none: false
|
77
78
|
requirements:
|