Class: Hash
Instance Method Summary collapse
Instance Method Details
#to_xml(name = nil) ⇒ Object
278 279 280 281 |
# File 'lib/formatters.rb', line 278 def to_xml(name = nil) data = to_a.map { |k, v| v.to_xml(k) }.join name ? "<#{name}>#{data}</#{name}>" : data end |