Sha256: 21a31af2ea78d752f62eb77570ddd3733865634035c5dc83d8bc0cd12d912f9c
Contents?: true
Size: 759 Bytes
Versions: 1
Compression:
Stored size: 759 Bytes
Contents
require "ysrmailParser/version" module YsrmailParser class YsrMail def test require 'socket' tempArray = [] File.open("/home/#{Socket.gethostname}/Desktop/t1.csv", 'r') do |f| while line = f.gets regex = Regexp.new(/\Wdestination\W+(\b\w+\D\w+\D\w+.+\w+)"\]/) t1 = line.scan(regex) tempArray << t1 end end temp = tempArray.reject(&:empty?) j = 0 i = 0 sortedArray = temp.sort countRepetedEmail = 1 while j < temp.count do if sortedArray[i] != sortedArray[i+1] puts sortedArray[i] puts " Repeted Count = #{countRepetedEmail}" countRepetedEmail = 1 else if sortedArray[i] == sortedArray[i+1] countRepetedEmail +=1 end end i+=1 j+=1 end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ysrmailParser-0.1.2 | lib/ysrmailParser.rb |