O'Reilly logo

Practical Ruby for System Administration by André Ben Hamou

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

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 ...

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