module Spellchecker::Dictionaries::EnglishWords
Constants
- MUTEX
- PATH
Public Instance Methods
all()
click to toggle source
@return [Set<String>]
# File lib/spellchecker/dictionaries/english_words.rb, line 13 def all @all || MUTEX.synchronize do @all ||= Set.new(PATH.read.split("\n")) end end
include?(word)
click to toggle source
@param word [String] @return [Boolean]
# File lib/spellchecker/dictionaries/english_words.rb, line 21 def include?(word) return false unless word all.include?(word.downcase) end