rexle-builder 1.0.0 → 1.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 547c1b1c12078cb9ed8bcfe6d9f4593d6165a3c7ade4024c643a16da9e4a7a13
4
- data.tar.gz: 6c5cc21289dfc25b269bdf6be6a13653f40b992c9abcb0264b8dbe703be4b345
3
+ metadata.gz: eda1c60846fb9f76df929bf427ce589c969482ad8e7fefb5fb3f2ece28acd54a
4
+ data.tar.gz: 337188bbc932c1824c70a753da66c5fa00216e6500c7d673adf4796371273c5d
5
5
  SHA512:
6
- metadata.gz: 2f321466d5a124f1d6884b2e9610020e4271e4467fe0f061d8b63376c211bba466604a4dc3788952e808bab880b352e2bc9a0adaae568f2db70f59b47dc9c422
7
- data.tar.gz: 1fa96ebfe99b94b071e9dbbd9c729b4a17b54230cebfe58650b803247db438c432899bf6a5edcdf29933fd892562e4be9af4640ad10367fbf87c726afb8953e1
6
+ metadata.gz: 6cf481ebbddf24c43907ace9c67892029f4f392e5404108c54c38ea363e079ba0ae94db52f38d714b3ee426121dee83aa59487ea307433110cb0e0a3199131bd
7
+ data.tar.gz: 3cfd8fbf699b75baa0e379519101205b4cf43496469a9c12cb84d111cf1c66974f59721aa6431734d674d078e8d59d78965a5374db1a5f6b61646262f7ef714b
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -51,8 +51,13 @@ class RexleBuilder
51
51
 
52
52
  def method_missing(sym, *args)
53
53
 
54
- args << '' if args.last.is_a? Hash
55
- value, attributes = args.reverse
54
+ puts 'args: ' + args.inspect if @debug
55
+
56
+ value = args.shift if args.first.is_a? String
57
+
58
+ # The obj is an optional Hash object used to build nested XML
59
+ # after the current element
60
+ attributes, obj = args
56
61
 
57
62
  if value =~ /^<.*>$/ then
58
63
 
@@ -72,6 +77,8 @@ class RexleBuilder
72
77
  # reserved keywords are masked with ._ e.g. ._method_missing
73
78
  a ||= [sym.to_s.sub(/^(?:\._|_)/,'').sub(/^cdata!$/,'![')\
74
79
  .sub(/^comment!$/, '!-'), attributes || {}, value || '']
80
+
81
+ a.concat RexleBuilder.new(obj, debug: false).to_a[3..-1] if obj
75
82
 
76
83
  if @namespace then
77
84
  a.first.prepend(@namespace + ':')
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: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  rC7AiWdayhS+wLWd/i/UtpYL25JcgKdaq24E/7+vB1EPRzPsDJrx8AzYo759WDob
36
36
  o0Nd2o91GHfpqyL9snw6G3Dl
37
37
  -----END CERTIFICATE-----
38
- date: 2020-05-01 00:00:00.000000000 Z
38
+ date: 2020-06-22 00:00:00.000000000 Z
39
39
  dependencies: []
40
40
  description:
41
41
  email: james@jamesrobertson.eu
metadata.gz.sig CHANGED
Binary file