Class: Hash

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

Class Method Summary collapse

Class Method Details

.from_xml(xml_io) ⇒ Object



7
8
9
10
11
# File 'lib/hash.rb', line 7

def from_xml(xml_io)
  result = Nokogiri::XML(xml_io)

  { key_value(result.root) => xml_node_to_hash(result.root) }
end