Method: Config.load_and_set_settings

Defined in:
lib/config.rb

.load_and_set_settings(*sources) ⇒ Object

Loads and sets the settings constant!



58
59
60
61
62
63
64
65
# File 'lib/config.rb', line 58

def self.load_and_set_settings(*sources)
  name = Config.const_name
  Object.send(:remove_const, name) if Object.const_defined?(name)

  # Include extra sources in the loading process
  all_sources = [sources, Config.extra_sources].flatten.compact
  Object.const_set(name, Config.load_files(*all_sources))
end