# File referrercop.rb, line 241 def self.extract_text(input, type) extracted = Array.new input.each do |line| @stats.lines += 1 # Skip over invalid lines. unless line =~ REGEXPS[:text_url] @stats.invalid += 1 next end # Examine the URL. if spam?($1) @stats.spam += 1 extracted << $1 if type == :spam else @stats.ham += 1 extracted << $1 if type == :ham end end extracted.delete('-') extracted.delete('') return extracted.uniq end