module Sct class Config def self.dir return "#{Sct::Helpers.homePath}/.config/sct" end def self.path return File.expand_path(File.join(self.dir, 'config')) end def self.exists return File.exists?(Config.path) end def self.get(key) config = self.read if !config.key?(key) return nil end return config[key] end def self.read if !self.exists return {} end contents = File.read(self.path) return Sct::Helpers.to_hash(contents) end end end