The Problem This technique came from my work on table_print, an irb tool for showing ruby objects in tables. I wanted to let people configure its output on a process-wide basis; eg, a default date format so sll their dates are shown consistently in the way they prefer. Additionally, I wanted a simple, easy-to-remember interface and a clean global namespace.
The Solution Here’s a basic syntax example for table_printing:
# prints all the authors, along with their book titles and photo captions > tp Author.