Class: Supso::Config
- Inherits:
-
Object
- Object
- Supso::Config
- Defined in:
- lib/supso/config.rb
Class Method Summary collapse
Class Method Details
.load_config! ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/supso/config.rb', line 3 def self.load_config! if !Supso.project_supso_config_root return end configs_to_load = ["/config.json"] configs_to_load.each do |relative_path| config_path = Supso.project_supso_config_root + relative_path loaded_config = File.exist?(config_path) ? JSON.parse(File.read(config_path)) : {} Supso.config = Util.deep_merge(Supso.config, loaded_config) end end |