Ruby implementation of a Stedman tool