About This Book

Part I, Metaprogramming Ruby, is the core of the book. Chapter 1, The M Word, walks you through the basic idea behind metaprogramming. The following chapters tell the story of a week in the life of a newly hired Ruby programmer and his or her more experienced colleague:

  • Ruby’s object model is the land in which metaprogramming lives. Chapter 2, Monday: The Object Model, provides a map to this land. This chapter introduces you to the most basic metaprogramming techniques. It also reveals the secrets behind Ruby classes and method lookup, the process by which Ruby finds and executes methods.

  • Once you understand method lookup, you can do some fancy things with methods: you can create methods at runtime, intercept method calls, ...

Get Metaprogramming Ruby 2 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.