Sha256: a490134b435900bfed51e5b78c8607aacae65023b142647b2e337b5e0759b3a1
Contents?: true
Size: 412 Bytes
Versions: 1
Compression:
Stored size: 412 Bytes
Contents
# coding: utf-8 require 'explicit_words/version' module ExplicitWords EXPLICIT_WORDS = File.open(File.expand_path('../explicit_words.txt', __FILE__)).readlines.collect { |word| word.downcase.chomp } 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
explicit_words-0.0.1 | lib/explicit_words.rb |