lib/wmap/url_crawler/adware_tag.rb
# Save the current tag store hash table into a file
Save the current tag store hash table into a file
Save the current tag store hash table into a file
def save_to_file!(file_tag=@tag_file, tags=@tag_store)
      puts "Saving the current wordpress site table from memory to file: #{file_tag} ..." if @verbose
			timestamp=Time.now
			f=File.open(file_tag, 'w')
			f.write "# Local tag file created by class #{self.class} method #{__method__} at: #{timestamp}\n"
			f.write "# Site, Landing URL, Detected Adware Tag, Tag Version, Tag Description\n"
			tags.each do |key, val|
				f.write "#{key}, #{val[0]}, #{val[1]}, #{val[2]}, #{val[3]}\n"
			end
			f.close
			puts "Tag store cache table is successfully saved: #{file_tag}"
		rescue => ee
			puts "Exception on method #{__method__}: #{ee}" if @verbose
  	end
def save_to_file! ( file_tag = @tag_file , tags = @tag_store ) puts "Saving the current wordpress site table from memory to file: #{file_tag} ..." if @verbose timestamp = Time . now f = File . open ( file_tag , 'w' ) f . write "# Local tag file created by class #{self.class} method #{__method__} at: #{timestamp}\n" f . write "# Site, Landing URL, Detected Adware Tag, Tag Version, Tag Description\n" tags . each do | key , val | f . write "#{key}, #{val[0]}, #{val[1]}, #{val[2]}, #{val[3]}\n" end f . close puts "Tag store cache table is successfully saved: #{file_tag}" rescue => ee puts "Exception on method #{__method__}: #{ee}" if @verbose end
Save the current tag store hash table into a file
Save the current tag store hash table into a file
file_tag
<not_specific>
tags
<not_specific>