<commit_before>module Neighborly::Api::ProjectConcern
  extend ActiveSupport::Concern

  included do
    %i(created_at expires_at online_date).each do |name|
      # class << self
      #   def between_created_at(starts_at, ends_at)
      #     between_dates('created_at', starts_at, ends_at)
      #   end
      # end
      define_singleton_method("between_#{name}") do |starts_at, ends_at|
        between_dates(name.to_s, starts_at, ends_at)
      end
    end

    private

    def self.between_dates(attribute, starts_at, ends_at)
      where(attribute => [starts_at..ends_at])
    end
  end
end<commit_msg>Use symbol keys in ProjectConcern<commit_after>module Neighborly::Api::ProjectConcern
  extend ActiveSupport::Concern

  included do
    %i(created_at expires_at online_date).each do |name|
      # class << self
      #   def between_created_at(starts_at, ends_at)
      #     between_dates(:created_at, starts_at, ends_at)
      #   end
      # end
      define_singleton_method("between_#{name}") do |starts_at, ends_at|
        between_dates(name, starts_at, ends_at)
      end
    end

    private

    def self.between_dates(attribute, starts_at, ends_at)
      where(attribute => [starts_at..ends_at])
    end
  end
end
{'fraction_non_alphanumeric': 0.09385113268608414, 'fraction_numerical': 0.0, 'mean_word_length': 3.2363013698630136, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '4616606', 'n_tokens_mistral': 420, 'n_tokens_neox': 410, 'n_words': 83}