Class: Profanity::Base
- Inherits:
-
Object
- Object
- Profanity::Base
- Defined in:
- lib/profanity/base.rb
Class Method Summary collapse
Class Method Details
.blacklist ⇒ Object
5 6 7 |
# File 'lib/profanity/base.rb', line 5 def blacklist @blacklist = Profanity::Config::BLACKLIST end |
.profane?(text) ⇒ Boolean
9 10 11 12 13 14 15 16 17 |
# File 'lib/profanity/base.rb', line 9 def profane?(text) profane = false blacklist.each do |word| if text.include? word profane = true; break end end profane end |