lib/lorj_meta.rb
# Used anytime config is updated (config data load or initialization)
#
# This function rebuild the section/key mapping
# Usually, executed while initializing or while loading a config.
Used anytime config is updated (config data load or initialization)
This function rebuild the section/key mapping
Usually, executed while initializing or while loading a config.
Used anytime config is updated ( config data load or initialization ) This function rebuild the section / key mapping Usually executed while initializing or while loading a config .
def build_section_mapping
      return unless p_exist?(:keys => [:sections])
      data = p_get(:keys => [:sections], :merge => true)
      return if data.nil?
      section_map = {}
      data.each do |section, values|
        next if values.nil?
        values.keys.each do |key|
          section_map[key] = [] unless section_map.key?(key)
          next if section_map[key].include?(section)
          section_map[key] << section
        end
      end
      p_set(:keys => [:keys], :value => section_map, :name => 'map')
    end
def build_section_mapping return unless p_exist? ( :keys => [ :sections ] ) data = p_get ( :keys => [ :sections ] , :merge => true ) return if data . nil? section_map = { } data . each do | section , values | next if values . nil? values . keys . each do | key | section_map [ key ] = [ ] unless section_map . key? ( key ) next if section_map [ key ] . include? ( section ) section_map [ key ] << section end end p_set ( :keys => [ :keys ] , :value => section_map , :name => 'map' ) end
Used anytime config is updated (config data load or initialization)
This function rebuild the section/key mapping
Usually, executed while initializing or while loading a config.
Used anytime config is updated ( config data load or initialization ) This function rebuild the section / key mapping Usually executed while initializing or while loading a config .
# The primary data key should change from key to section & key.