Sha256: bf996cff3531149f1618427a760dc4520a526563ff0ca5410bc1944d41bf9f21
Contents?: true
Size: 292 Bytes
Versions: 1
Compression:
Stored size: 292 Bytes
Contents
class Cl module Suggest include DidYouMean if defined?(DidYouMean) def suggest(dict, value) return [] unless defined?(DidYouMean) Array(value).map do |value| SpellChecker.new(dictionary: dict.map(&:to_s)).correct(value.to_s) end.flatten end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cl-1.1.0 | lib/cl/helper/suggest.rb |