dynarex 0.6.0 → 0.6.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.
Files changed (2) hide show
  1. data/lib/dynarex.rb +5 -1
  2. metadata +1 -1
@@ -102,7 +102,11 @@ EOF
102
102
 
103
103
  record_name, fields = capture_fields(params)
104
104
  record = Element.new record_name
105
- fields.each{|k,v| record.add Element.new(k.to_s).add_text(v) if v}
105
+ fields.each do |k,v|
106
+ element = Element.new(k.to_s)
107
+ element.text = v if v
108
+ record.add element
109
+ end
106
110
 
107
111
  ids = XPath.match(@doc.root,'records/*/attribute::id').map &:value
108
112
  id = ids.empty? ? 1 : ids.max.succ
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynarex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors: []
7
7