kind_dom 0.9.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/kind_dom/base.rb +3 -3
- metadata +3 -3
data/lib/kind_dom/base.rb
CHANGED
|
@@ -74,13 +74,13 @@ module KindDom
|
|
|
74
74
|
def content_for(xpath='.', default=nil) # :yields: found_content
|
|
75
75
|
content = cache "content_for(#{xpath})" do
|
|
76
76
|
node = case @dom.class.to_s
|
|
77
|
-
when 'XML::Document' then
|
|
77
|
+
when 'XML::Document' then # for libxml-ruby 0.5.x compatibility
|
|
78
78
|
@dom.root.find_first(xpath)
|
|
79
79
|
else # 'XML::Node'
|
|
80
80
|
@dom.find_first(xpath)
|
|
81
81
|
end
|
|
82
82
|
case node.class.to_s
|
|
83
|
-
when 'XML::Attr' then
|
|
83
|
+
when 'XML::Attr', 'LibXML::XML::Attr' then
|
|
84
84
|
node.value
|
|
85
85
|
else
|
|
86
86
|
node.content
|
|
@@ -127,7 +127,7 @@ module KindDom
|
|
|
127
127
|
def first_of(xpath, default=nil) # :yields: found_node
|
|
128
128
|
n = cache "first_of(#{xpath})" do
|
|
129
129
|
case @dom.class.to_s
|
|
130
|
-
when 'XML::Document' then
|
|
130
|
+
when 'XML::Document' then # for libxml-ruby 0.5.x compatibility
|
|
131
131
|
@dom.root.find_first(xpath)
|
|
132
132
|
else # 'XML::Node'
|
|
133
133
|
@dom.find_first(xpath)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kind_dom
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mars Hall
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2008-09
|
|
12
|
+
date: 2008-10-09 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -26,7 +26,7 @@ dependencies:
|
|
|
26
26
|
version_requirement:
|
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
|
28
28
|
requirements:
|
|
29
|
-
- - "
|
|
29
|
+
- - ">="
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
31
|
version: 0.5.4
|
|
32
32
|
version:
|