Sha256: df8cf7e4f2ee5876fa7902c5f307dd7c8d4c182c0137b0ebd9970ea648753795
Contents?: true
Size: 530 Bytes
Versions: 2
Compression:
Stored size: 530 Bytes
Contents
module Smoke module Output class XML def self.generate(tree_name, items) builder = Nokogiri::XML::Builder.new do |xml| xml.items { items.each do |item| xml.item { %w(id type class).each{|m| item["#{m}_".to_sym] = item.delete(m.to_sym) } item.each do |k, v| xml.send(k, v) end } end } end builder.to_xml end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
smoke-0.5.17 | lib/smoke/output/xml.rb |
smoke-0.5.16 | lib/smoke/output/xml.rb |