A practice exercise in writing a Ruby library