<commit_before># encoding: utf-8

module NessusDB

	# Templater class for generating a report from a erb template
	#
	# @author <NAME>
	class Templater
		attr_accessor :template, :erb, :findings
		
		# Setups of the Templater class initalizing all of the variables
		#
		# @author <NAME>
		def initialize(template, findings)
			@template = template
			@findings = findings
			@erb = ERB.new(@template)
		end
		
		# Generates a report based on the erb template
		#
		# @ returns [String] html output of the erb template
		# 
		# @author <NAME>
		def generate
			html = @erb.run(@findings.get_binding)
			
			return html
		end
	end
end<commit_msg>Changed run to results for win!<commit_after># encoding: utf-8

module NessusDB

	# Templater class for generating a report from a erb template
	#
	# @author <NAME>
	class Templater
		attr_accessor :template, :erb, :findings
		
		# Setups of the Templater class initalizing all of the variables
		#
		# @author <NAME>
		def initialize(template, findings)
			@template = template
			@findings = findings
			@erb = ERB.new File.new(@template).read, nil, "%" #(@template)
		end
		
		# Generates a report based on the erb template
		#
		# @ returns [String] html output of the erb template
		# 
		# @author <NAME>
		def generate
			begin
				html = @erb.result(@findings.get_binding)
								
				return html
			rescue => e
				puts "Error:" << e.message
			end
		end
	end
end
{'fraction_non_alphanumeric': 0.0903316866619619, 'fraction_numerical': 0.0014114326040931546, 'mean_word_length': 3.146198830409357, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '484222', 'n_tokens_mistral': 553, 'n_tokens_neox': 468, 'n_words': 158}