lib/legion/settings.rb in legion-settings-0.1.1 vs lib/legion/settings.rb in legion-settings-0.2.0

- old
+ new

@@ -24,15 +24,24 @@ def [](key) Legion::Logging.info('Legion::Settings was not loading, auto loading now!') if @loader.nil? @loader = load if @loader.nil? @loader[key] + rescue NoMethodError, TypeError + Legion::Logging.fatal 'rescue inside [](key)' + nil end def set_prop(key, value) - Legion::Logging.info('Legion::Settings was not loading, auto loading now!') if @loader.nil? @loader = load if @loader.nil? @loader[key] = value + end + + def merge_settings(key, hash) + @loader = load if @loader.nil? + thing = {} + thing[key.to_sym] = hash + @loader.load_module_default(thing) end end end end