code as module method with specs

Never seen this before. Cool!