Chapter Recap
What was new in this chapter?
End-of-line differences among operating systems
Regular expressions, including the
?
counterThe
sprintf
methodMultiplication of Arrays
The
inject
methodRegular expressions with the
+
counterObjects as the results of blocks
Calling successive methods on the output of methods (“chaining” methods)
Using new methods of Open Classes in quick scripts
Multiplication of Strings
The
grep
methodThe
map
methodThe Range class
Recursion
That’s quite a bit, including some important new functional concepts like recursion and a few very handy functional methods. You’ll need these concepts as we move on. Let’s proceed to some more complex treatment of numbers in Chapter 5.
Get Ruby by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.