array-compositing 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +5 -1
- data/README.rdoc +0 -0
- data/lib/array/compositing.rb +0 -7
- data/lib/array/compositing/array_interface.rb +23 -1
- metadata +4 -3
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
ADDED
File without changes
|
data/lib/array/compositing.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
|
2
2
|
require 'array/hooked'
|
3
|
-
#require_relative '../../../../hooked_objects/array-hooked/lib/array-hooked.rb'
|
4
3
|
|
5
4
|
# namespaces that have to be declared ahead of time for proper load order
|
6
5
|
require_relative './namespaces'
|
@@ -10,12 +9,6 @@ require_relative './requires.rb'
|
|
10
9
|
|
11
10
|
class ::Array::Compositing < ::Array::Hooked
|
12
11
|
|
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
12
|
include ::Array::Compositing::ArrayInterface
|
20
13
|
|
21
14
|
end
|
@@ -6,6 +6,28 @@ module ::Array::Compositing::ArrayInterface
|
|
6
6
|
instances_identify_as!( ::Array::Compositing )
|
7
7
|
|
8
8
|
ParentIndexStruct = ::Struct.new( :local_index, :replaced )
|
9
|
+
|
10
|
+
extend ::Module::Cluster
|
11
|
+
|
12
|
+
cluster( :compositing_array_interface ).before_include.cascade_to( :class ) do |hooked_instance|
|
13
|
+
|
14
|
+
hooked_instance.class_eval do
|
15
|
+
|
16
|
+
unless method_defined?( :non_cascading_set )
|
17
|
+
alias_method :non_cascading_set, :[]=
|
18
|
+
end
|
19
|
+
|
20
|
+
unless method_defined?( :non_cascading_insert )
|
21
|
+
alias_method :non_cascading_insert, :insert
|
22
|
+
end
|
23
|
+
|
24
|
+
unless method_defined?( :non_cascading_delete_at )
|
25
|
+
alias_method :non_cascading_delete_at, :delete_at
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
9
31
|
|
10
32
|
################
|
11
33
|
# initialize #
|
@@ -261,7 +283,7 @@ module ::Array::Compositing::ArrayInterface
|
|
261
283
|
################################################
|
262
284
|
# perform_single_object_insert_between_hooks #
|
263
285
|
################################################
|
264
|
-
|
286
|
+
|
265
287
|
def perform_single_object_insert_between_hooks( local_index, object )
|
266
288
|
|
267
289
|
if local_index = super
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: array-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:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: array-hooked
|
@@ -44,6 +44,7 @@ files:
|
|
44
44
|
- spec/array/compositing/parent_index_map_spec.rb
|
45
45
|
- spec/array/compositing_spec.rb
|
46
46
|
- README.md
|
47
|
+
- README.rdoc
|
47
48
|
- CHANGELOG.rdoc
|
48
49
|
homepage: http://rubygems.org/gems/array-compositing
|
49
50
|
licenses: []
|
@@ -56,7 +57,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
56
57
|
requirements:
|
57
58
|
- - ! '>='
|
58
59
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
60
|
+
version: '0'
|
60
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
62
|
none: false
|
62
63
|
requirements:
|