lib/core/core.rb
# This function is used to keep compatibility with old way to load
# processes and controllers
# If processes is a Array of Hash => new way
# otherwise we need to create it.
This function is used to keep compatibility with old way to load
processes and controllers
If processes is a Array of Hash => new way
otherwise we need to create it.
This function is used to keep compatibility with old way to load processes and controllers If processes is a Array of Hash = > new way otherwise we need to create it .
def adapt_core_parameters(processes, controller)
      return [] unless processes.is_a?(Array)
      return [] if processes.length == 0
      return processes if processes[0].is_a?(Hash)
      PrcLib.warning('lorj initialization with Process & controller parameters'\
                     ' is obsolete. Read Lorj::Core.new to update it and '\
                     'eliminate this warning')
      processes = processes_as_array(processes)
      processes_built = []
      processes.each do |process|
        process = process.to_s if process.is_a?(Symbol)
        a_process = {}
        if process.include?('/')
          a_process[:process_path] = process
          a_process[:process_name] = File.basename(process)
        else
          a_process[:process_module] = process
        end
        processes_built << a_process
      end
      _adapt_with_controller(processes_built, controller)
      processes_built
    end
def adapt_core_parameters ( processes , controller ) return [ ] unless processes . is_a? ( Array ) return [ ] if processes . length == 0 return processes if processes [ 0 ] . is_a? ( Hash ) PrcLib . warning ( 'lorj initialization with Process & controller parameters' ' is obsolete. Read Lorj::Core.new to update it and ' 'eliminate this warning' ) processes = processes_as_array ( processes ) processes_built = [ ] processes . each do | process | process = process . to_s if process . is_a? ( Symbol ) a_process = { } if process . include? ( '/' ) a_process [ :process_path ] = process a_process [ :process_name ] = File . basename ( process ) else a_process [ :process_module ] = process end processes_built << a_process end _adapt_with_controller ( processes_built , controller ) processes_built end
This function is used to keep compatibility with old way to load
processes and controllers
If processes is a Array of Hash => new way
otherwise we need to create it.
This function is used to keep compatibility with old way to load processes and controllers If processes is a Array of Hash = > new way otherwise we need to create it .
# Declare processes
processes
<not_specific>
controller
<not_specific>