<commit_before>module Doattend

	class Ticket
		
		attr_accessor :result

		def initialize(result)
			self.result = result
		end
		
		# Returns different ticket names that is available for the event.
		def names
			self.result.map{ |t| t['Ticket_Name'] }.uniq
		end

	end

end<commit_msg>defined aggregate method for ticket class that returns the number of tickets for a ticket name<commit_after>module Doattend

	class Ticket
		
		attr_accessor :result

		def initialize(result)
			self.result = result
		end
		
		# Returns different ticket names that is available for the event.
		def names
			self.result.map{ |t| t['Ticket_Name'] }.uniq
		end
		
		# Returns number of registrations for a ticket type
		def aggregate(name)
			self.result.count{ |t| t['Ticket_Name'] == name }
		end

	end

end
{'fraction_non_alphanumeric': 0.07169811320754717, 'fraction_numerical': 0.0, 'mean_word_length': 3.422222222222222, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4402773', 'n_tokens_mistral': 287, 'n_tokens_neox': 240, 'n_words': 89}