#!/usr/bin/env ruby # This code comes from http://ruby-it.org/pages/David+N.+Welton # Check the page for copyright notice and explanations