medea 0.2.10 → 0.2.11
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/VERSION +1 -1
- data/lib/medea/jasonobject.rb +4 -4
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.11
|
data/lib/medea/jasonobject.rb
CHANGED
@@ -14,11 +14,11 @@ module Medea
|
|
14
14
|
inheritable_attributes :owned
|
15
15
|
@owned = false
|
16
16
|
|
17
|
-
def
|
17
|
+
def create_member_list list_name, list_class, list_type
|
18
18
|
list = {}
|
19
19
|
list = self.class_variable_get :@@lists if self.class_variable_defined? :@@lists
|
20
20
|
list[list_name] = [list_class, list_type]
|
21
|
-
self.class_variable_set
|
21
|
+
self.class_variable_set(:@@lists, list)
|
22
22
|
|
23
23
|
define_method(list_name) do
|
24
24
|
#puts "Looking at the #{list_name.to_s} list, which is full of #{list_type.name}s"
|
@@ -26,11 +26,11 @@ module Medea
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
29
|
+
def has_many list_name, list_class
|
30
30
|
create_member_list list_name, list_class, :reference
|
31
31
|
end
|
32
32
|
|
33
|
-
def
|
33
|
+
def owns_many list_name, list_class
|
34
34
|
create_member_list list_name, list_class, :value
|
35
35
|
|
36
36
|
#also modify the items in the list so that they know that they're owned
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: medea
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 11
|
10
|
+
version: 0.2.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Jensen
|