Class: DespamilatorFilter::SquareBrackets
- Inherits:
-
Despamilator::Filter
- Object
- Despamilator::Filter
- DespamilatorFilter::SquareBrackets
- Defined in:
- lib/despamilator/filter/square_brackets.rb
Instance Method Summary collapse
Instance Method Details
#description ⇒ Object
11 12 13 |
# File 'lib/despamilator/filter/square_brackets.rb', line 11 def description 'Detects each square bracket in a string' end |
#name ⇒ Object
7 8 9 |
# File 'lib/despamilator/filter/square_brackets.rb', line 7 def name 'Square Brackets' end |
#parse(subject) ⇒ Object
15 16 17 18 19 |
# File 'lib/despamilator/filter/square_brackets.rb', line 15 def parse subject subject.text.downcase.scan(/(\[|\])/).each do |match| subject.register_match!({:score => 0.05, :filter => self}) end end |