Chapter 4. The Power of Metaprogramming

So far, you'll have acquired an impression of the basics of Ruby—its flavor, if you will. For me, what really sets it apart is the way in which it facilitates metaprogramming. Of course, this is a somewhat nebulous statement if one hasn't properly defined what class of programming is worthy of such a prefix (see the sidebar "Meta ... What?").

This is the last of the chapters that take a "did you know?" approach to the language itself, identifying features that will be useful in your day-to-day programming. The concepts presented in this chapter are not inherently system administration-specific, but they are key to writing clean, expressive Ruby code. Moreover, the techniques discussed here can allow for some ...

Get Practical Ruby for System Administration 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.