<commit_before>class Frame
  include Mongoid::Document
  include Mongoid::Timestamps

  MAX_TRIES = 2
  embedded_in :bowling_game
 	
 	
	field :hits, type: Array, default: -> { Array.new() }

	validate :validate_hits
	
	def validate_hits
    errors.add(:hits, "to many tries") if hits.size > MAX_TRIES
  end<commit_msg>rename validation method<commit_after>class Frame
  include Mongoid::Document
  include Mongoid::Timestamps

  MAX_TRIES = 2
  embedded_in :bowling_game
 	
 	
	field :hits, type: Array, default: -> { Array.new() }

	validate :validates_number_of_hits
	
	def validates_number_of_hits
		if hits.size > MAX_TRIES
    	errors.add(:hits, "to many attempts, valid only #{MAX_TRIES}") 
    end
  end
{'fraction_non_alphanumeric': 0.09282700421940929, 'fraction_numerical': 0.0028129395218002813, 'mean_word_length': 4.049645390070922, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5730311', 'n_tokens_mistral': 261, 'n_tokens_neox': 246, 'n_words': 61}