lib/helpers/mazi_config.rb
# changes the current configuration (in memory)
# use -> to change deeper values (eg admin->admin_password)
changes the current configuration (in memory)
use -> to change deeper values
changes the current configuration ( in memory ) use - > to change deeper values
def changeConfigFile(key, value)
    keys = key.split('->')
    i = 0
    conf = nil
    keys.each do |k|
      next if i == keys.length - 1
      conf = conf.nil? ? @config[k.to_sym] : conf[k.to_sym]
      i += 1
    end
    conf[keys.last.to_sym] = value
    @config
  end
def changeConfigFile ( key , value ) keys = key . split ( '->' ) i = 0 conf = nil keys . each do | k | next if i == keys . length - 1 conf = conf . nil? ? @config [ k . to_sym ] : conf [ k . to_sym ] i += 1 end conf [ keys . last . to_sym ] = value @config end
changes the current configuration (in memory)
use -> to change deeper values (eg admin->admin_password)
changes the current configuration ( in memory ) use - > to change deeper values ( eg admin - > admin_password )
key
<not_specific>
value
<not_specific>