class ProfanityFilterEngine::AllowDuplicateCharactersStrategy
Constants
- DEFAULT_IGNORE_CASE
Private Instance Methods
build_word_regexp(word)
click to toggle source
# File lib/profanity-filter/engines/allow_duplicate_characters_strategy.rb, line 11 def build_word_regexp(word) word.chars.map { |char| Regexp.escape(char) + '+' }.join end