rexle-builder 0.4.0 → 0.5.0

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: 6ebfc391e13a159b0e2e647bda142d93a88c5c23c00883e804c1aef08b9a619d
4
- data.tar.gz: 4ef64119a90d3bad4a64df1e4a7b421dae9ebead3e8d7d4196514f87f858b83d
3
+ metadata.gz: 6c10f565f608cd8850c3653410cb91c024f8121d96154ba2080ee60a878b9dbb
4
+ data.tar.gz: 0b67e9ee49fdcdd241d0d83e1e8e3cbd67e3de067a904169eff4b0387932ba65
5
5
  SHA512:
6
- metadata.gz: 3152fe4b085e87ae9852438bfc3ad39d19e1efb0981b1d611cf0581c6d27bb566c891a57c787f684e31502ddbf7431d1e560ee62a9b88724d73a617560a02084
7
- data.tar.gz: 3f407a4d65ff642459fa84870f246791153a6b7fbed41ed89f31fd9704736c040a702b8302cffa0cd97ab97550e30b876b4cac4a82d4a76e9e17f24b58b0872d
6
+ metadata.gz: 7a9f3c513c20603e72ea209bee4172c35bf87cf6ab3efbee6c73fcea804f21ff7d6852e6e28b1ff8e27d8799ad43dc744ae3aaea95a136cbd2c3b04611c9fc55
7
+ data.tar.gz: 8dc6ccdcd3d92ba330739d11eb8d898c5d99587ec89fb47a450d09e4ac8dd2389175264c19ff49f01d844966e8ac26262ada5bb0bec935287d3d29108e072580
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/rexle-builder.rb CHANGED
@@ -14,14 +14,15 @@ end
14
14
 
15
15
  class RexleBuilder
16
16
 
17
- def self.build()
17
+ def self.build(debug: false)
18
18
 
19
- yield(self.new)
19
+ yield(self.new(debug: debug))
20
20
 
21
21
  end
22
22
 
23
- def initialize(obj=nil)
23
+ def initialize(obj=nil, debug: false)
24
24
 
25
+ @debug = debug
25
26
  @a = []
26
27
  @current_a = @a
27
28
  @namespace = nil
@@ -53,6 +54,13 @@ class RexleBuilder
53
54
  args << '' if args.last.is_a? Hash
54
55
  value, attributes = args.reverse
55
56
 
57
+ value = Rexle.new(value).to_a if value =~ /^<.*>$/
58
+
59
+ if @debug then
60
+ puts 'sym: ' + sym.inspect
61
+ puts 'args: ' + args.inspect
62
+ end
63
+
56
64
  # reserved keywords are masked with ._ e.g. ._method_missing
57
65
  a = [sym.to_s.sub(/^(?:\._|_)/,'').sub(/^cdata!$/,'![')\
58
66
  .sub(/^comment!$/, '!-'), attributes || {}, value || '']
data.tar.gz.sig CHANGED
Binary file
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.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  mhjduVy/qI0Fq2iBzsi+riXduSKKTKrvgbTbDfkk7gZK2Xb14hLgVeNOBxhvWUGj
36
36
  Boxgzq1tc6BbNomHiuZGxQTh
37
37
  -----END CERTIFICATE-----
38
- date: 2019-04-21 00:00:00.000000000 Z
38
+ date: 2019-08-09 00:00:00.000000000 Z
39
39
  dependencies: []
40
40
  description:
41
41
  email: james@jamesrobertson.eu
metadata.gz.sig CHANGED
Binary file