roundtrip_xml 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roundtrip_xml/dsl_builder.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5849fafbc85b77e0d69f8e666fb448c2ad1e4587
|
4
|
+
data.tar.gz: ebbb32cf50068e62bf885db90bf2f1e511dc1615
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e64a54d09659d4954280f0ebd543162a8d53369840b882fcf789aff98aead6b5e3027c53622f39dcc6622b8534d3790d6bd7e9678e132ecfca543a456e212d19
|
7
|
+
data.tar.gz: bafb364f19e5f0c248feac36ea2a49732124b92057c3e4289995a35fd0cb965db82978d450ef3958308a38d66772cfbe339d164fc9a1d1eb6264e09d29264ed6
|
@@ -19,7 +19,8 @@ class DslBuilder
|
|
19
19
|
selector = attr.name
|
20
20
|
|
21
21
|
if attr.sought_type == :text
|
22
|
-
|
22
|
+
text_element = xml.children.find {|c| c.name == selector}
|
23
|
+
out += inset + "#{accessor} '#{text_element.content}'\n" if text_element
|
23
24
|
elsif attr.sought_type == :attr
|
24
25
|
child_attribute = xml.attributes[selector]
|
25
26
|
out += inset + "#{accessor} '#{child_attribute.content}'\n" if child_attribute
|