Sha256: 1793bd64842087da595dfab1812c5c9e869d159b0f4875c68d59df308a8d361b

Contents?: true

Size: 524 Bytes

Versions: 3

Compression:

Stored size: 524 Bytes

Contents

module Smoke
  module Output
    class XML
      def self.generate(tree_name, items)
        builder = Nokogiri::XML::Builder.new do |xml|
            xml.send(tree_name) {
              xml.items {
                items.each do |item|
                  xml.item {
                    item.each_pair do |key, value|
                      xml.send(key, value)
                    end
                  }
                end
              }
            }
        end
        
        builder.to_xml
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
benschwarz-smoke-0.5.13 lib/smoke/output/xml.rb
smoke-0.5.13 lib/smoke/output/xml.rb
smoke-0.5.12 lib/smoke/output/xml.rb