Class: DespamilatorFilter::IPAddressURL
- Inherits:
-
Despamilator::Filter
- Object
- Despamilator::Filter
- DespamilatorFilter::IPAddressURL
- Defined in:
- lib/despamilator/filter/ip_address_url.rb
Instance Method Summary collapse
Instance Method Details
#description ⇒ Object
11 12 13 |
# File 'lib/despamilator/filter/ip_address_url.rb', line 11 def description 'Detects IP address URLs' end |
#name ⇒ Object
7 8 9 |
# File 'lib/despamilator/filter/ip_address_url.rb', line 7 def name 'IP Address URL' end |
#parse(subject) ⇒ Object
15 16 17 18 19 |
# File 'lib/despamilator/filter/ip_address_url.rb', line 15 def parse subject subject.register_match!({ :score => 0.5, :filter => self }) if subject.text.downcase.count(/http:\/\/\d+\.\d+\.\d+\.\d+/) > 0 end |