O'Reilly logo

Ruby by Example by Kevin C. Baird

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

#19 Currency Conversion, Advanced (currency_converter2.rb)

This script builds on what we already know from the previous one and uses a similar approach for the actual conversion process. What we’ve added is the ability to store and retrieve external data in both YAML and XML formats. YAML is so readable that I will simply tell you what you need to know for this script, and I’m sure that you’ll be inspired to learn more about how it works. XML is a bit more complicated, and it’s beyond the scope of this book to teach it to you if you’re not familiar with it, but you won’t need to be an expert to follow along. I’ll describe the relevant bits of XML for this script’s operation, just as I’ll do with YAML. If you find that the XML-related content of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required