Creating DSLs with Ruby

J. Freeze. Creating DSLs with Ruby., March 2006. [doi]


Broadly speaking, there are two ways to create a DSL. One is to invent a syntax from scratch, and build an interpreter or compiler. The other is to tailor an existing general-purpose language by adding or changing methods, operators, and default actions. This article explores using the latter method to build a DSL on top of Ruby.