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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c10f565f608cd8850c3653410cb91c024f8121d96154ba2080ee60a878b9dbb
4
- data.tar.gz: 0b67e9ee49fdcdd241d0d83e1e8e3cbd67e3de067a904169eff4b0387932ba65
3
+ metadata.gz: 7f25f0c66d91f41499946b564868878a8348ee552a9c3895c32bf9d36bbe31b4
4
+ data.tar.gz: 6f33bff7d370aa3211b918a54c456ae5a4d56c9e7eaf80ef52426566c2cb31ae
5
5
  SHA512:
6
- metadata.gz: 7a9f3c513c20603e72ea209bee4172c35bf87cf6ab3efbee6c73fcea804f21ff7d6852e6e28b1ff8e27d8799ad43dc744ae3aaea95a136cbd2c3b04611c9fc55
7
- data.tar.gz: 8dc6ccdcd3d92ba330739d11eb8d898c5d99587ec89fb47a450d09e4ac8dd2389175264c19ff49f01d844966e8ac26262ada5bb0bec935287d3d29108e072580
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
- value = Rexle.new(value).to_a if value =~ /^<.*>$/
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 = [sym.to_s.sub(/^(?:\._|_)/,'').sub(/^cdata!$/,'![')\
73
+ a ||= [sym.to_s.sub(/^(?:\._|_)/,'').sub(/^cdata!$/,'![')\
66
74
  .sub(/^comment!$/, '!-'), attributes || {}, value || '']
67
75
 
68
76
  if @namespace then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rexle-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file