<commit_before>## 
# == Usage
# Whatever you want to load any config file, you need to use the SCFG.load
# method, then, set or get the values by key.
#
# == Arguments of SCFG.load
# :name, module name
# :path, specifying complete path
# :return, return the values
# :current, load current options as the return values

class SCFG

	OPTIONS = {
		:status 		=> 'development',
		:email			=> 'empty',
		:author 		=> 'administrator',
		:log 			=> false,
		:log_path 		=> Dir.pwd + '/log/default',
		:module_focus 	=> 'front',
		:module_repos 	=> File.expand_path('~/SeimRepos'),
		:website 		=> "https://github.com/coolesting",
		:open			=> "on",
		:level			=> 0,
		:load_order		=> 9
	}

	@@options = {}
	@@changed = []
	@@path	  = 'Seimfile'

	class << self

		#load config to the @@options by @@path
		def load options = {}

			result = {}
			isload = false
			content = ""

			@@path = options[:path] if options.include? :path
			@@path = "modules/#{options[:name]}/#{F_INFO}" if options.include? :name
			@@path = File.expand_path(@@path)
			isload = true if File.exist?(@@path)

			#load from config file
			if options.include?(:current) and @@options.include?(@@path)
				result = @@options[@@path]
			elsif isload == true
				content << File.read(@@path)
				if content.index("\n") and content.index("=")
					content.split("\n").each do | con |
						key,val = con.split("=")
						result[key] = val
					end
				end
			end

			@@options[@@path] = {} unless @@options.include?(@@path)
			@@options[@@path] = result

			if options.include? :init
				init
			end

			#return the result
			if options.include? :return
				result 
			else
				isload
			end
		end<commit_msg>updating the config class for adding the commenting function<commit_after>## 
# == Usage
# Whatever you want to load any config file, you need to use the SCFG.load
# method, then, set or get the values by key.
#
# == Arguments of SCFG.load
# :name, module name
# :path, specifying complete path
# :return, return the values
# :current, load current options as the return values

class SCFG

	OPTIONS = {
		:status 		=> 'development',
		:email			=> 'empty',
		:author 		=> 'administrator',
		:log 			=> false,
		:log_path 		=> Dir.pwd + '/log/default',
		:module_focus 	=> 'front',
		:module_repos 	=> File.expand_path('~/SeimRepos'),
		:website 		=> "https://github.com/coolesting",
		:open			=> "on",
		:level			=> 0,
		:load_order		=> 9
	}

	@@options = {}
	@@changed = []
	@@path	  = 'Seimfile'

	class << self

		#load config to the @@options by @@path
		def load options = {}

			result = {}
			isload = false
			content = ""

			@@path = options[:path] if options.include? :path
			@@path = "modules/#{options[:name]}/#{F_INFO}" if options.include? :name
			@@path = File.expand_path(@@path)
			isload = true if File.exist?(@@path)

			#load from config file
			if options.include?(:current) and @@options.include?(@@path)
				result = @@options[@@path]
			elsif isload == true
				content << File.read(@@path)
				if content.index("\n")
					content.split("\n").each do | line |
						unless line[0] == '"' and line.index("=")
							key,val = line.split("=")
							result[key] = val
						end
					end
				end
			end

			@@options[@@path] = {} unless @@options.include?(@@path)
			@@options[@@path] = result

			if options.include? :init
				init
			end

			#return the result
			if options.include? :return
				result 
			else
				isload
			end
		end
{'fraction_non_alphanumeric': 0.16278392545136866, 'fraction_numerical': 0.00145602795573675, 'mean_word_length': 2.9756944444444446, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 25, 'https://': 2, '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': '5174242', 'n_tokens_mistral': 1433, 'n_tokens_neox': 1172, 'n_words': 328}