instance method
DidYouMean::TreeSpellChecker#find_leaves
find_leaves(path)
lib/did_you_mean/tree_spell_checker.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/did_you_mean/tree_spell_checker.rb, line 39
def find_leaves(path)
path_with_separator = "#{path}#{separator}"
dictionary
.select {|str| str.include?(path_with_separator) }
.map {|str| str.gsub(path_with_separator, '') }
end
No documentation available
See also
#find_ideas
#find_suggestions
#fall_back_to_normal_spell_check
#ideas_to_paths
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1