module Spellchecker::Dictionaries::CompanyNames

Constants

MUTEX
PATH

Public Instance Methods

all() click to toggle source

@return [Set<String>]

# File lib/spellchecker/dictionaries/company_names.rb, line 12
def all
  @all || MUTEX.synchronize do
    @all ||= Set.new(PATH.read.split("\n"))
  end
end
include?(string) click to toggle source

@param string [String] @return [Boolean]

# File lib/spellchecker/dictionaries/company_names.rb, line 20
def include?(string)
  return false unless string

  all.include?(Utils.remove_suffix(string))
end