One of the things that seems to draw people to Ruby is the ability to create and change all things at metprogrammatically at runtime. This in turn allows users to create things like domain-specific languages and the like.
I’m possibly overusing these features at the moment, because it’s a cool new thing ™.
So, let’s see how to add methods at runtime. Since this is Ruby, there are multiple ways to do this, making things more confusing.
(See also the follow-up article)