kvx 0.5.1 → 0.5.2

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
  SHA1:
3
- metadata.gz: 87152a397a91d277a4fd6bffd8b0f3cfee6b2e18
4
- data.tar.gz: b9597d1e4cc1b5ee2096df3cd72910c622797be1
3
+ metadata.gz: bc814fe7c23ceb5e0956ea8dd6c3ecdf63bd20aa
4
+ data.tar.gz: 4710c9a9528b7344548c10c969b9750f7b1f7d78
5
5
  SHA512:
6
- metadata.gz: d3c30bd57a4701bcd69138829717989f168f3b3e7b1e023fb552844e448d81bdcc6401ca2518558c58c6dddd92451aa955012fcd7f85f57a68c8161121e56928
7
- data.tar.gz: d743674022f2a71acb00256c9d265e3a33ba03c44beb27ad3da23d27037c42f98f8236eb8213a20cdff3afd8aed1bcc8758da26763dd4eec1a2af9c618aa6fad
6
+ metadata.gz: b35e115424b75dd5ee0fa289743b9c47e9d271cacb8425a1b49ed60f72e292b9cc8087e2c4690e3a73b3a82f9d4bc2fca364986c9a68192a0e283c9ca6ceaf75
7
+ data.tar.gz: 5006379ee8b4597b51e48d3b87918b94fe27032bf441233c7e2780ceca1ef005c1bb9fd5ee812d61157da70251d6b16afd6601e16ece035cc73146fe059879c8
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/kvx.rb CHANGED
@@ -72,9 +72,14 @@ class Kvx
72
72
 
73
73
  def to_xml(options={pretty: true})
74
74
 
75
- summary = [:summary, {}, *make_xml(@summary)]
76
- body = [:body, {}, *make_xml(@body)]
77
- a = [self.class.to_s.downcase, @attributes, '', summary, body]
75
+ if @summary.empty? then
76
+ a = [self.class.to_s.downcase, @attributes, '', *make_xml(@body)]
77
+ else
78
+ summary = [:summary, {}, *make_xml(@summary)]
79
+ body = [:body, {}, *make_xml(@body)]
80
+ a = [self.class.to_s.downcase, @attributes, '', summary, body]
81
+ end
82
+
78
83
  Rexle.new(a).xml(options)
79
84
 
80
85
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kvx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file