lib/core/core_internal.rb
# Load data definition in process data layers
Load data definition in process data layers
Load data definition in process data layers
def _process_load_data(config, index, name, file,
                           config_class = PRC::BaseConfig)
      return unless config.layer_index(name).nil?
      return if file.nil?
      layer = PRC::CoreConfig.define_layer(:name => name,
                                           :config => config_class.new,
                                           :load => true,
                                           :set => false)
      unless File.exist?(file)
        PrcLib.warning("Process '%s', data file '%s' doesn't exist."\
                       ' Not loaded.', name, file)
        return
      end
      begin
        unless layer[:config].load(file)
          PrcLib.warning("Process '%s', data file '%s' was not loaded.",
                         name, file)
        end
      rescue => e
        PrcLib.error("Process '%s', unable to load data file '%s'. %s",
                     name, file, e.message)
      end
      config.layer_add(layer.merge(:index => (config.layers.length - index)))
    end
def _process_load_data ( config , index , name , file , config_class = PRC :: BaseConfig ) return unless config . layer_index ( name ) . nil? return if file . nil? layer = PRC :: CoreConfig . define_layer ( :name => name , :config => config_class . new , :load => true , :set => false ) unless File . exist? ( file ) PrcLib . warning ( "Process '%s', data file '%s' doesn't exist." ' Not loaded.' , name , file ) return end begin unless layer [ :config ] . load ( file ) PrcLib . warning ( "Process '%s', data file '%s' was not loaded." , name , file ) end rescue => e PrcLib . error ( "Process '%s', unable to load data file '%s'. %s" , name , file , e . message ) end config . layer_add ( layer . merge ( :index => ( config . layers . length - index ) ) ) end
Load data definition in process data layers
Load data definition in process data layers
config
<not_specific>
index
<not_specific>
name
<not_specific>
file
<not_specific>
config_class
<not_specific>