Module: October::Config
Instance Method Summary collapse
Methods included from Environment
configuration, configuration!, environment, load_configuration
Instance Method Details
#load_config! ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/october/config.rb', line 4 def load_config! env = Config.configuration('irc.yml') return unless env.present? env.each_pair do |key, value| # FIXME: make DRY # FIXME: only one level - bad, only to support SSL nested values for now if value.is_a? Hash subconfig = config.send key.dup value.each_pair do |key, value| subconfig.send key.dup << '=', value end else config.send key.dup << '=', value end end end |