Class: Hash

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

Class Method Summary collapse

Class Method Details

.from_xml(xml) ⇒ Object



5
6
7
8
# File 'lib/dmm/core_ext/hash.rb', line 5

def from_xml(xml)
  result = Nokogiri::XML(xml)
  { result.root.name.to_s.to_sym => xml_elem_to_hash(result.root) }
end