<commit_before>module Ajimi
  class Config

    attr_accessor :config

    def initialize
      @config = {}
    end

    def self.load(path)
      Ajimi::Config.new.tap do |obj|
        obj.load_file(path)
      end.config
    end

    def load_file(path)
      instance_eval(File.read(path), path) if path
    end

    CONFIG_KEYWORDS = [
      :source_host,
      :source_user,
      :source_key,
      :target_host,
      :target_user,
      :target_key,
      :check_root_path,
      :ignore_paths,
      :ignore_contents,
      :pending_paths,
      :pending_contents
    ]

    CONFIG_KEYWORDS.each do |keyword|
      define_method(keyword) { |param| @config[keyword] = param }
    end

  end
end<commit_msg>Refactor CONFIG_KEYWORDS<commit_after>module Ajimi
  class Config

    attr_accessor :config

    def initialize
      @config = {}
    end

    def self.load(path)
      Ajimi::Config.new.tap do |obj|
        obj.load_file(path)
      end.config
    end

    def load_file(path)
      instance_eval(File.read(path), path) if path
    end

    CONFIG_KEYWORDS = %i(
      source_host
      source_user
      source_key
      target_host
      target_user
      target_key
      check_root_path
      ignore_paths
      ignore_contents
      pending_paths
      pending_contents
    )

    CONFIG_KEYWORDS.each do |keyword|
      define_method(keyword) { |param| @config[keyword] = param }
    end

  end
end
{'fraction_non_alphanumeric': 0.07876230661040788, 'fraction_numerical': 0.0, 'mean_word_length': 2.2194570135746607, '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': '5858206', 'n_tokens_mistral': 480, 'n_tokens_neox': 461, 'n_words': 95}