is_a_collection 0.0.3 → 0.0.4
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/lib/is_a_collection.rb +2 -2
- metadata +3 -3
data/lib/is_a_collection.rb
CHANGED
@@ -7,10 +7,10 @@ class Class
|
|
7
7
|
extend ClassMethods
|
8
8
|
|
9
9
|
define_method :add_to_collection do
|
10
|
-
self.class.__collection[
|
10
|
+
self.class.__collection[__send__ id_method] = self
|
11
11
|
end
|
12
12
|
define_method :remove_from_collection do
|
13
|
-
self.class.__collection.delete(
|
13
|
+
self.class.__collection.delete(__send__ id_method)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 4
|
9
|
+
version: 0.0.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Niko Dittmann
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-12-02 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|