<commit_before># settings_file.rb
require 'json'

module HipChatSecrets
  class SettingsFile
    attr_reader :config_file, :config

    def initialize setting_path=nil
      @config_file = find_configs(setting_path).first
      parse_config
    end

    # pass unknown method calls to the config object
    def method_missing meth, *args, &block
      if @config.include? meth.to_s
        @config[meth.to_s]
      else
        super<commit_msg>check for > 1 config file found<commit_after># settings_file.rb
require 'json'

module HipChatSecrets
  class SettingsFile
    attr_reader :config_file, :config

    def initialize setting_path=nil
      configs = find_configs(setting_path)
      raise "Could not locate any config files." if configs.length < 1
      @config_file = configs.first
      parse_config
    end

    # pass unknown method calls to the config object
    def method_missing meth, *args, &block
      if @config.include? meth.to_s
        @config[meth.to_s]
      else
        super
{'fraction_non_alphanumeric': 0.06480558325024925, 'fraction_numerical': 0.0019940179461615153, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 4, '<?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': '1960483', 'n_tokens_mistral': 305, 'n_tokens_neox': 294, 'n_words': 90}