Will write code that writes code that writes code for food.
Introduction
Metaprogramming…it sounds cool! It sounds like a design technique for high-level enterprise architects or a faddish buzzword that has found its way into press releases.
In fact, far from being an abstract concept or a bit of marketing-speak, metaprogramming is a collection of down-to-earth, pragmatic coding techniques. It doesn’t just sound cool; it is cool. Here are some things you can do with metaprogramming in the Ruby language:
-
Say you want to write a Ruby program that connects to an external system—maybe a web service or a Java program. With metaprogramming, you can write a wrapper that takes any method call and routes it to the external system. ...