polyrex-objects 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/polyrex-objects.rb +9 -1
- metadata +2 -2
data/lib/polyrex-objects.rb
CHANGED
@@ -72,12 +72,20 @@ class PolyrexObjects
|
|
72
72
|
@create.record = @node
|
73
73
|
@create
|
74
74
|
end
|
75
|
-
|
75
|
+
|
76
76
|
alias #{@class_names[i].downcase} records
|
77
77
|
|
78
78
|
}"
|
79
79
|
end
|
80
80
|
|
81
|
+
@class_names[1..-1].each_with_index do |class_name, k|
|
82
|
+
eval "#{class_name}.class_eval {
|
83
|
+
def parent()
|
84
|
+
#{@class_names[k]}.new(@node.parent.parent)
|
85
|
+
end
|
86
|
+
}"
|
87
|
+
end
|
88
|
+
|
81
89
|
methodx = @class_names.map do |name|
|
82
90
|
%Q(def #{name.downcase}(); #{name}.new(@node, @id); end)
|
83
91
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyrex-objects
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors: []
|
7
7
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-06-
|
12
|
+
date: 2010-06-15 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|