class ProfanityFilterEngine::AllowSymbolsInWordsStrategy

Constants

DEFAULT_IGNORE_CASE
SYMBOLS_REGEXP

Private Instance Methods

build_word_regexp(word) click to toggle source
# File lib/profanity-filter/engines/allow_symbols_in_words_strategy.rb, line 12
def build_word_regexp(word)
  word.chars.map { |char| Regexp.escape(char) }.join(SYMBOLS_REGEXP)
end