title: Ruby convert Object to Hash
body: <p>Let's say I have a <code>Gift</code> object with <code>@name = "book"</code> &amp; <code>@price = 15.95</code>. What's the best way to convert that to the Hash <code>{name: "book", price: 15.95}</code> in Ruby, not Rails (although feel free to give the Rails answer too)?</p>