Sha256: 006971e1dd72fe61df8cd40564eb13a7ae4b2cbb59b795cc663f76709539188d

Contents?: true

Size: 530 Bytes

Versions: 12

Compression:

Stored size: 530 Bytes

Contents

module Gluttonberg
  module Content
    require 'despamilator/filter'

    module DespamilatorFilter

      class IPAddressURL < Despamilator::Filter

        def name
          'IP Address URL'
        end

        def description
          'Detects IP address URLs'
        end

        def parse subject
          subject.register_match!({
              :score => 0.5, :filter => self
          }) if subject.text.downcase.count(/http:\/\/\d+\.\d+\.\d+\.\d+/) > 0
        end

      end

    end
  end #Content
end #Gluttonberg

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gluttonberg-core-3.0.2 lib/gluttonberg/content/despamilator/filter/ip_address_url.rb
gluttonberg-core-3.0.1 lib/gluttonberg/content/despamilator/filter/ip_address_url.rb
gluttonberg-core-3.0.0 lib/gluttonberg/content/despamilator/filter/ip_address_url.rb
gluttonberg-core-2.6.4 lib/gluttonberg/content/despamilator/filter/ip_address_url.rb
gluttonberg-core-2.6.3 lib/gluttonberg/content/despamilator/filter/ip_address_url.rb
gluttonberg-core-2.6.2 lib/gluttonberg/content/despamilator/filter/ip_address_url.rb
gluttonberg-core-2.6.1 lib/gluttonberg/content/despamilator/filter/ip_address_url.rb
gluttonberg-core-2.6.0 lib/gluttonberg/content/despamilator/filter/ip_address_url.rb
gluttonberg-core-2.5.9 lib/gluttonberg/content/despamilator/filter/ip_address_url.rb
gluttonberg-core-2.5.8 lib/gluttonberg/content/despamilator/filter/ip_address_url.rb
gluttonberg-core-2.5.7 lib/gluttonberg/content/despamilator/filter/ip_address_url.rb
gluttonberg-core-2.5.6 lib/gluttonberg/content/despamilator/filter/ip_address_url.rb