polyrex 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/polyrex.rb +3 -1
- metadata +2 -2
data/lib/polyrex.rb
CHANGED
@@ -16,7 +16,7 @@ class Polyrex
|
|
16
16
|
|
17
17
|
def initialize(location)
|
18
18
|
|
19
|
-
@id = '
|
19
|
+
@id = '1'
|
20
20
|
open(location)
|
21
21
|
summary_h = Hash[*@doc.xpath("summary/*").map {|x| [x.name, x.text]}.flatten]
|
22
22
|
@summary = OpenStruct.new summary_h
|
@@ -26,6 +26,8 @@ class Polyrex
|
|
26
26
|
|
27
27
|
def create(id=nil)
|
28
28
|
# @create is a PolyrexCreateObject, @parent_node is a REXML::Element pointing to the current record
|
29
|
+
@id.succ!
|
30
|
+
@create.id = id || @id
|
29
31
|
@create.record = @parent_node.name == 'records' ? @parent_node : @parent_node.element('records')
|
30
32
|
@create
|
31
33
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: polyrex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.8.
|
5
|
+
version: 0.8.6
|
6
6
|
platform: ruby
|
7
7
|
authors: []
|
8
8
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-15 00:00:00 +00:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|