<commit_before>require 'data_paths/methods'

module DataPaths
  include Methods

  def self.included(base)
    base.extend Methods
  end

  #
  # The registered `data/` directories.
  #
  # @return [Set]
  #   The directories which contain static content.
  #
  def DataPaths.paths
    @data_paths ||= []
  end

  def DataPaths.register(path)
    path = File.expand_path(path)

    unless File.directory?(path)
      raise(RuntimeError,"#{path.dump} must be a directory")
    end

    paths << path unless paths.include?(path)
    return path
  end

  def DataPaths.unregister!(path)
    paths.delete(File.expand_path(path))
  end
end
<commit_msg>Added documentation.<commit_after>require 'data_paths/methods'

module DataPaths
  include Methods

  def self.included(base)
    base.extend Methods
  end

  #
  # The registered `data/` directories.
  #
  # @return [Set]
  #   The directories which contain static content.
  #
  def DataPaths.paths
    @data_paths ||= []
  end

  #
  # Registers a `data/` directory.
  #
  # @return [String]
  #   The registered `data/` directory.
  #
  # @raise [RuntimeError]
  #   The given path was not a directory.
  #
  # @since 0.3.0
  #
  def DataPaths.register(path)
    path = File.expand_path(path)

    unless File.directory?(path)
      raise("#{path.dump} must be a directory")
    end

    paths << path unless paths.include?(path)
    return path
  end

  #
  # Unregisters a previously registered `data/` directory.
  #
  # @return [String]
  #   The unregistered `data/` directory.
  #
  # @since 0.3.0
  #
  def DataPaths.unregister!(path)
    paths.delete(File.expand_path(path))
  end
end

{'fraction_non_alphanumeric': 0.11253041362530414, 'fraction_numerical': 0.0036496350364963502, 'mean_word_length': 2.9166666666666665, 'pattern_counts': {'":': 0, '<': 7, '<?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': '941977', 'n_tokens_mistral': 562, 'n_tokens_neox': 543, 'n_words': 138}