module ExplicitWords

Constants

EXPLICIT_WORDS
VERSION

Public Class Methods

check(content) click to toggle source
# File lib/explicit_words.rb, line 7
def self.check(content)
  explicit_content = false

  content.scan(/[\w]+/).each do |word|
    explicit_content = true if EXPLICIT_WORDS.include?(word.downcase)
  end

  explicit_content
end