Text shortener for ruby