Class: ProfanityFilterEngine::Component

Inherits:
Object
  • Object
show all
Defined in:
lib/profanity-filter/engines/component.rb

Direct Known Subclasses

Composite, RegexpStrategy

Instance Method Summary collapse

Instance Method Details

#profane?(text) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


5
6
7
# File 'lib/profanity-filter/engines/component.rb', line 5

def profane?(text)
  raise NotImplementedError
end

#profane_words(text) ⇒ Object

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/profanity-filter/engines/component.rb', line 9

def profane_words(text)
  raise NotImplementedError
end

#profanity_count(text) ⇒ Object



13
14
15
# File 'lib/profanity-filter/engines/component.rb', line 13

def profanity_count(text)
  profane_words(text).size
end