<commit_before># frozen_string_literal: true

module Folio::BelongsToSite
  extend ActiveSupport::Concern

  included do
    belongs_to :site, class_name: "Folio::Site",
                      required: false

    validate :validate_belongs_to_site
  end

  class_methods do<commit_msg>add by_atom_setting_site_id scope to belongs_to_site concern<commit_after># frozen_string_literal: true

module Folio::BelongsToSite
  extend ActiveSupport::Concern

  included do
    belongs_to :site, class_name: "Folio::Site",
                      required: false

    validate :validate_belongs_to_site

    scope :by_atom_setting_site_id, -> (site_id) { where(site_id:) }
  end

  class_methods do
{'fraction_non_alphanumeric': 0.07132459970887918, 'fraction_numerical': 0.0, 'mean_word_length': 3.879432624113475, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2484024', 'n_tokens_mistral': 224, 'n_tokens_neox': 213, 'n_words': 48}