Creating DSLs with Ruby

J. Freeze. Creating DSLs with Ruby. http://www.artima.com/rubycs/articles/ruby_as_dsl.html, March 2006. [doi]

Abstract

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.