1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
module PostRunner class RuntimeConfig def initialize @settings = {} @settings['data_dir'] = File.join(ENV['HOME'], '.postrunner') @settings['fit_dir'] = File.join(@settings['data_dir'], 'fit') end def [](key) @settings[key] end end Config = RuntimeConfig.new end