dynarex 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dynarex.rb +4 -0
- metadata +2 -2
data/lib/dynarex.rb
CHANGED
@@ -192,6 +192,10 @@ EOF
|
|
192
192
|
h = Hash[*XPath.match(@doc.root, "records/*[@id='#{id}']/*").map {|x| [x.name, x.text]}.flatten]
|
193
193
|
OpenStruct.new h
|
194
194
|
end
|
195
|
+
|
196
|
+
def record_exists?(id)
|
197
|
+
XPath.first(@doc.root, "records/*[@id='#{id}']").nil? ? false : true
|
198
|
+
end
|
195
199
|
|
196
200
|
private
|
197
201
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynarex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.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-
|
12
|
+
date: 2010-09-01 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|