rexle-builder 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rexle-builder.rb +10 -2
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f25f0c66d91f41499946b564868878a8348ee552a9c3895c32bf9d36bbe31b4
|
4
|
+
data.tar.gz: 6f33bff7d370aa3211b918a54c456ae5a4d56c9e7eaf80ef52426566c2cb31ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e217242f78cae4f7651edb690931e097c484eebced18875a504f39c5bdda9ebfea35f69c23ae88419590a6409d993fb26933c7278328d83cff49a9a8e17d6e5
|
7
|
+
data.tar.gz: a644fef61874a62c0790ec22a5635b7aa38598c44d42bc3d5cb84bbc5a35e4d0d02367af12c7091cc6446862dee198702a137207e3b8133a4e3872c3411f6b22
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexle-builder.rb
CHANGED
@@ -54,7 +54,15 @@ class RexleBuilder
|
|
54
54
|
args << '' if args.last.is_a? Hash
|
55
55
|
value, attributes = args.reverse
|
56
56
|
|
57
|
-
|
57
|
+
if value =~ /^<.*>$/ then
|
58
|
+
|
59
|
+
a = [
|
60
|
+
sym.to_s,
|
61
|
+
attributes,
|
62
|
+
*Rexle.new("<root>%s</root>" % value).to_a[2..-1]
|
63
|
+
]
|
64
|
+
|
65
|
+
end
|
58
66
|
|
59
67
|
if @debug then
|
60
68
|
puts 'sym: ' + sym.inspect
|
@@ -62,7 +70,7 @@ class RexleBuilder
|
|
62
70
|
end
|
63
71
|
|
64
72
|
# reserved keywords are masked with ._ e.g. ._method_missing
|
65
|
-
a
|
73
|
+
a ||= [sym.to_s.sub(/^(?:\._|_)/,'').sub(/^cdata!$/,'![')\
|
66
74
|
.sub(/^comment!$/, '!-'), attributes || {}, value || '']
|
67
75
|
|
68
76
|
if @namespace then
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|