<commit_before>class Feed
	attr_accessor :feed

	def initialize(raw_feed)
		@feed = []
		add(raw_feed)
	end

	def add(raw_feed)
		@feed = @feed + clean_feed(raw_feed)
	end

	def clean_feed(raw_feed)
		remove_links(filter_out_crap(raw_feed))
	end

	def filter_out_crap(raw_feed)
		raw_feed.reject do |tweet|
			(tweet.full_text[0] == '@') || (tweet.full_text[0..3] == 'RT @') || (tweet.full_text[1] == '@')
		end
	end

	def remove_links(raw_feed)
		raw_feed.map do |tweet|
			tweet.full_text.gsub(/(https?:[\w|\/|\.|\?|\&]+)/i, '')
		end
	end
end<commit_msg>Make Feed class include Enumerable<commit_after>class Feed
	include Enumerable
	attr_accessor :feed

	def initialize(raw_feed)
		@feed = []
		add(raw_feed)
	end

  def each(&block)
    @feed.each do |tweet|
      block.call(tweet)
    end
  end

	def add(raw_feed)
		@feed = @feed + clean_feed(raw_feed)
	end

	def clean_feed(raw_feed)
		remove_links(filter_out_crap(raw_feed))
	end

	def filter_out_crap(raw_feed)
		raw_feed.reject do |tweet|
			(tweet.full_text[0] == '@') || (tweet.full_text[0..3] == 'RT @') || (tweet.full_text[1] == '@')
		end
	end

	def remove_links(raw_feed)
		raw_feed.map do |tweet|
			tweet.full_text.gsub(/(https?:[\w|\/|\.|\?|\&]+)/i, '')
		end
	end
end
{'fraction_non_alphanumeric': 0.17110573042776434, 'fraction_numerical': 0.00645682001614205, 'mean_word_length': 3.9402390438247012, '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': '6361684', 'n_tokens_mistral': 570, 'n_tokens_neox': 529, 'n_words': 91}