Chapter Recap
What was new in this chapter?
Exponentiation in Ruby
Returning
nilwhen a method’s operation is not possibleMore recursion and exit conditions
Modules and Inheritance
Hash.mergeClass Variables
Array.detect(“find first”)Subtracting Hashes
Exiting the entire script with
failbegin—rescue—endDownloading with
open-uriParsing XML files with regular expressions
Writing to YAML files with
YAML.dumpReading from YAML files with
YAML.load
It’s almost as if this chapter weren’t really about numbers—we covered a large amount of generically useful information, especially Modules, Class Variables, and external data storage and retrieval using either XML or YAML (or both). We’ve done a bit of functional programming already in the last two chapters, but ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access