wasabi 3.1.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,30 +0,0 @@
1
- module Wasabi
2
- module XPathHelper
3
-
4
- NAMESPACES = {
5
- "xs" => "http://www.w3.org/2001/XMLSchema",
6
- "wsdl" => "http://schemas.xmlsoap.org/wsdl/",
7
- "soap11" => "http://schemas.xmlsoap.org/wsdl/soap/",
8
- "soap12" => "http://schemas.xmlsoap.org/wsdl/soap12/"
9
- }
10
-
11
- def xpath(*args)
12
- node, xpath = extract_xpath_args(args)
13
- node.xpath(xpath, NAMESPACES)
14
- end
15
-
16
- def at_xpath(*args)
17
- node, xpath = extract_xpath_args(args)
18
- node.at_xpath(xpath, NAMESPACES)
19
- end
20
-
21
- private
22
-
23
- def extract_xpath_args(args)
24
- xpath, target = args.reverse
25
- target ||= document if respond_to?(:document)
26
- [target, xpath]
27
- end
28
-
29
- end
30
- end