Sha256: ed896a32fa5968f1b8328112e4783c880b6df98d3d8e640b6a2b8696460f8e4d

Contents?: true

Size: 377 Bytes

Versions: 5

Compression:

Stored size: 377 Bytes

Contents

require 'despamilator/filter'

module DespamilatorFilter

  class TrailingNumber < Despamilator::Filter

    def name
      'Trailing Number'
    end

    def description
      'Detects a trailing cache busting number'
    end

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

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
despamilator-2.1.4 lib/despamilator/filter/trailing_number.rb
despamilator-2.1.3 lib/despamilator/filter/trailing_number.rb
despamilator-2.1.2 lib/despamilator/filter/trailing_number.rb
despamilator-2.1.1 lib/despamilator/filter/trailing_number.rb
despamilator-2.1 lib/despamilator/filter/trailing_number.rb