Sha256: 113179845b81bb15c787aff8b1e3bf2d3ce30ab7c68c5577d86f8f1242409457
Contents?: true
Size: 369 Bytes
Versions: 31
Compression:
Stored size: 369 Bytes
Contents
module Unitwise::Standard module Extras def hash_to_markup(hash) hash.map do |k,v| if v.respond_to?(:to_xml) "<#{k}>#{v.to_xml}</#{k}>" elsif v.respond_to?(:map) v.map do |i| "<#{k}>#{i}</#{k}>" end.join('') else "<#{k}>#{v}</#{k}>" end end.join('') end end end
Version data entries
31 entries across 31 versions & 2 rubygems