<commit_before>module App
  def self.initialize!
    Pliny::Utils.require_glob("#{App.root}/config/initializers/*.rb")
  end

  def self.root
    @@root ||= File.expand_path("../../", __FILE__)
  end
end

[
  "config/config",
  "lib/endpoints/base",
  "lib/endpoints/**/*",
  "lib/mediators/base",
  "lib/mediators/**/*",
  "lib/routes",
].
map { |f| App.root + "/" + f + ".rb" }.
each { |f| Pliny::Utils.require_glob(f) }<commit_msg>More idiomatic code<commit_after>module App
  def self.initialize!
    Pliny::Utils.require_glob("#{App.root}/config/initializers/*.rb")
  end

  def self.require!(globs)
    globs.map { |f| App.root + "/" + f + ".rb" }.
      each { |f| Pliny::Utils.require_glob(f) }
  end

  def self.root
    @@root ||= File.expand_path("../../", __FILE__)
  end
end

App.require!([
  "config/config",
  "lib/endpoints/base",
  "lib/endpoints/**/*",
  "lib/mediators/base",
  "lib/mediators/**/*",
  "lib/routes",
])
{'fraction_non_alphanumeric': 0.22625400213447172, 'fraction_numerical': 0.0, 'mean_word_length': 3.2062780269058297, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1393126', 'n_tokens_mistral': 370, 'n_tokens_neox': 365, 'n_words': 60}