This shows a simple use of the tod gem I used in a Stack Overflow answer