polyrex-createobject 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/polyrex-createobject.rb +4 -4
- metadata +1 -1
data/lib/polyrex-createobject.rb
CHANGED
@@ -10,9 +10,9 @@ class PolyrexCreateObject
|
|
10
10
|
|
11
11
|
attr_accessor :id
|
12
12
|
|
13
|
-
def initialize(schema, id=
|
13
|
+
def initialize(schema, id='1')
|
14
14
|
@id = id
|
15
|
-
|
15
|
+
|
16
16
|
@schema = schema
|
17
17
|
a = @schema.split('/')
|
18
18
|
|
@@ -60,8 +60,8 @@ end
|
|
60
60
|
@id = id if id
|
61
61
|
|
62
62
|
record.root.add_attribute('id', @id.to_s)
|
63
|
-
if @id
|
64
|
-
@id
|
63
|
+
if @id[/[0-9]/] then
|
64
|
+
@id.succ!
|
65
65
|
else
|
66
66
|
@id = XPath.first(@parent_node.root, 'count(//@id)').to_i + 2
|
67
67
|
end
|