require 'yaml' module TimedConfig class <= (@last_load + period) if TimedConfig.path && File.exists?(TimedConfig.path) @config = YAML::load(File.open(TimedConfig.path)) else @config = nil end @last_load = Time.now end @config end TimedConfig.reload end end