<commit_before>require 'releaf/acts_as_node/active_record/acts/node'
require 'releaf/acts_as_node/action_controller/acts/node'

module ActsAsNode
  @classes = []

  def self.register_class(class_name)
    @classes << class_name unless @classes.include? class_name
  end

  def self.classes
    @classes
  end

  if defined? Rails::Railtie
    require 'rails'
    class Railtie < Rails::Railtie
      initializer 'acts_as_node.insert' do
        ActiveSupport.on_load :active_record do
          ActsAsNode::Railtie.insert_into_active_record<commit_msg>eager load in dev env<commit_after>require 'releaf/acts_as_node/active_record/acts/node'
require 'releaf/acts_as_node/action_controller/acts/node'

module ActsAsNode
  @classes = []

  def self.register_class(class_name)
    @classes << class_name unless @classes.include? class_name
  end

  def self.classes
    # eager load in dev env
    Rails.application.eager_load! if Rails.env.development?

    @classes
  end

  if defined? Rails::Railtie
    require 'rails'
    class Railtie < Rails::Railtie
      initializer 'acts_as_node.insert' do
        ActiveSupport.on_load :active_record do
          ActsAsNode::Railtie.insert_into_active_record
{'fraction_non_alphanumeric': 0.08243130724396336, 'fraction_numerical': 0.0, 'mean_word_length': 3.987551867219917, 'pattern_counts': {'":': 0, '<': 9, '<?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': '2730058', 'n_tokens_mistral': 412, 'n_tokens_neox': 380, 'n_words': 79}