Metaprogramming

Writing a DSL in Ruby

5 minute read

An internal DSL is just Ruby that reads like a little language of its own. RSpec, Rake and Sinatra are all built this way. Here’s how to build one yourself, ...

How Ruby Finds a Method

5 minute read

Every method call in Ruby is a search. Once you can see the chain the interpreter walks (modules, prepends, singleton classes, super), the object model turns...