Created
August 25, 2008 12:12
-
-
Save vangberg/7065 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ irb | |
>> require 'harry_from_xml' | |
>> xml = '<menu> | |
<drink> | |
<name>Death in the Afternoon</name> | |
</drink> | |
<drink> | |
<name>Mojito</name> | |
</drink> | |
</menu>' | |
>> HarryFromXML.to_hash xml | |
=> {:menu=>{:drink=>[{:name=>"Death in the afternoon"}, {:name=>"Mojito"}]}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment