Class RDig::UrlFilters::PatternFilter
In: lib/rdig/url_filters.rb
Parent: Object

base class for url inclusion / exclusion filters

Methods

new  

Public Class methods

takes an Array of Regexps, or nil to disable the filter

[Source]

    # File lib/rdig/url_filters.rb, line 87
87:       def initialize(args=nil)
88:         unless args.nil?
89:           @patterns = []
90:           if args.respond_to? :each
91:             args.each { |pattern| 
92:               # cloning because unsure if regexps are thread safe ?
93:               @patterns << pattern #.clone
94:             }
95:           else
96:             @patterns << args #.clone
97:           end
98:         end
99:       end

[Validate]