John Quarles' solutions for advanced Ruby building blocks