dynarex 1.0.9 → 1.0.10

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 +17 -18
  2. metadata +2 -2
@@ -326,28 +326,27 @@ EOF
326
326
 
327
327
  def rebuild_doc
328
328
 
329
- xml = Builder::XmlMarkup.new( :target => buffer='', :indent => 2 )
330
- xml.instruct! :xml, :version => "1.0", :encoding => "UTF-8"
331
-
332
- xml.send @root_name do
333
- xml.summary do
334
- @summary.each{|key,value| xml.send key, value}
335
- end
336
- if @records then
337
- xml.records do
338
-
339
- @records.each do |k, item|
340
- xml.send(@record_name, id: item[:id], created: item[:created], \
341
- last_modified: item[:last_modified]) do
342
- item[:body].each{|name,value| xml.send name, value}
329
+ builder = Nokogiri::XML::Builder.new do |xml|
330
+ xml.send @root_name do
331
+ xml.summary do
332
+ @summary.each{|key,value| xml.send key, value}
333
+ end
334
+ if @records then
335
+ xml.records do
336
+
337
+ @records.each do |k, item|
338
+ xml.send(@record_name, id: item[:id], created: item[:created], \
339
+ last_modified: item[:last_modified]) do
340
+ item[:body].each{|name,value| xml.send name, value}
341
+ end
343
342
  end
344
- end
345
343
 
346
- end
347
- end # end of if @records
344
+ end
345
+ end # end of if @records
346
+ end
348
347
  end
349
348
 
350
- @doc = Rexle.new buffer
349
+ @doc = Rexle.new builder.to_xml
351
350
 
352
351
  end
353
352
 
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: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors: []
7
7
 
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2011-02-07 00:00:00 +00:00
12
+ date: 2011-02-08 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency