Method: Bundler::SimilarityDetector#similar_word_list
- Defined in:
- lib/bundler/similarity_detector.rb
#similar_word_list(word, limit = 3) ⇒ Object
return the result of ‘similar_words’, concatenated into a list (eg “a, b, or c”)
20 21 22 23 24 25 26 27 |
# File 'lib/bundler/similarity_detector.rb', line 20 def similar_word_list(word, limit = 3) words = similar_words(word, limit) if words.length == 1 words[0] elsif words.length > 1 [words[0..-2].join(", "), words[-1]].join(" or ") end end |