Class: Gyoku::Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/gyoku/hash.rb

Class Method Summary collapse

Class Method Details

.to_xml(hash, options = {}) ⇒ Object

Builds XML and prettifies it if pretty_print option is set to true



12
13
14
15
16
17
18
19
20
# File 'lib/gyoku/hash.rb', line 12

def self.to_xml(hash, options = {})
  xml = build_xml(hash, options)

  if options[:pretty_print]
    Prettifier.prettify(xml, options)
  else
    xml
  end
end