Ruby was designed to make programmers happy. One of the features that makes it possible is a comprehensive metaprogramming tooling.
What is metaprogramming? How is it implemented in Ruby?
Let’s take a look under the hood of the simplest meta-technique—method_missing
—and discover what lies behind it.
And to make this investigation more meta-exciting, we’ll try rewriting it from scratch but in Ruby! (So, don’t be afraid of some C code.)