Ruby port of an old parameter capture script.