<commit_before>class Poll < ActiveRecord::Base
  belongs_to :user
  has_many   :votes

  attr_accessor :start_date, :finish_date
end<commit_msg>Updates Polls to add recent scope and verify presence of start & finish datetimes<commit_after>class Poll < ActiveRecord::Base
  belongs_to :user
  has_many   :votes

  scope :recent_start, ->(limit = 5) { order('start DESC').limit(limit) }

  validates :start,  presence: true
  validates :finish, presence: true

  def range
    (vote_min..vote_max)
  end
end
{'fraction_non_alphanumeric': 0.09108910891089109, 'fraction_numerical': 0.0019801980198019802, 'mean_word_length': 4.56043956043956, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '5478928', 'n_tokens_mistral': 170, 'n_tokens_neox': 165, 'n_words': 48}