Add solution to logest-words problem in Ruby