When I teach metaprogramming like dynamically defining methods and method delegation, students usually understand what it is fairly quickly because it's simply a dynamic way of doing something they've already done. I now want to assign them a project that utilizes the metaprogamming I've taught. I'm having trouble thinking of a project to assign them which would be made significantly easier by using metaprogramming. The only use I know of is in a DSL. Creating a DSL is a rather large project to assign a group of high school students, so I'd prefer something smaller.
Specifically this project is for fairly advanced students working with ruby, but more general answers are better.
So, what projects could you assign to illustrate the utility of metaprogramming?