Class: DespamilatorFilter::TrailingNumber

Inherits:
Despamilator::Filter show all
Defined in:
lib/despamilator/filter/trailing_number.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



11
12
13
# File 'lib/despamilator/filter/trailing_number.rb', line 11

def description
  'Detects a trailing cache busting number'
end

#nameObject



7
8
9
# File 'lib/despamilator/filter/trailing_number.rb', line 7

def name
  'Trailing Number'
end

#parse(subject) ⇒ Object



15
16
17
# File 'lib/despamilator/filter/trailing_number.rb', line 15

def parse subject
  subject.register_match!({:score => 0.1, :filter => self}) if subject.text.without_uris =~ /\b\d+\s*$/
end