<commit_before># Allows associating classes with other classes. This can form a nesting hierarchy. This is also
# used in Coursemology to associate components that a course can have enabled.
#
# Components in this file refer to the concept.
#
# In Development mode, classes are not eager loaded. Component hosts then do not know which
# components
# have been implemented.
#
# @example Declare that a class can host other components.
#   class Course
#     include Modular
#   end
#
# @example Declare that the Announcements class is a component belonging to a Course.
#   class Announcements
#     include Course::Component
#   end
module Componentize
  extend ActiveSupport::Concern

  included do
    Componentize.become_component_host(self)
  end

  private

  # Extends the given host with methods needed to host other classes.
  #
  # @param [Class] host The host to convert into a host.<commit_msg>Fix componentize comments.<commit_after># Allows associating classes with other classes. This can form a nesting hierarchy. This is also
# used in Coursemology to associate components that a course can have enabled.
#
# In Development mode, classes are not eager loaded. Component hosts then do not know which
# components have been implemented. Call #{Componentize.eager_load_components} to load all
# components within a given path.
#
# @example Declare that a class can host other components.
#   class Course
#     include Componentize
#   end
#
# @example Declare that the Announcements class is a component belonging to a Course.
#   class Announcements
#     include Course::Component
#   end
module Componentize
  extend ActiveSupport::Concern

  included do
    Componentize.become_component_host(self)
  end

  private

  # Extends the given host with methods needed to host other classes.
  #
  # @param [Class] host The host to convert into a host.
{'fraction_non_alphanumeric': 0.05201072386058981, 'fraction_numerical': 0.0, 'mean_word_length': 4.002680965147453, 'pattern_counts': {'":': 0, '<': 3, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6059965', 'n_tokens_mistral': 484, 'n_tokens_neox': 473, 'n_words': 237}