lib/core/core_setup_init.rb
# Internal setup function to parse objects/attributes dependency list
# and build objects list and required attributes list.
Internal setup function to parse objects/attributes dependency list
and build objects list and required attributes list.
Internal setup function to parse objects / attributes dependency list and build objects list and required attributes list .
def _setup_identify_deps(dependencies, object_type, path = [])
      model_object = dependencies.rh_get(:objects, object_type)
      objects_list = PrcLib.model.meta_obj.rh_get(object_type, :params, :keys)
      if objects_list.nil?
        PrcLib.warning("'%s' as object type is not valid. Not declared.")
        return [[], [], []]
      end
      objects = []
      attrs = []
      deps_attrs = []
      deps_objects = []
      new_path = path + [object_type]
      objects_list.each do |attr_path, attr_params|
        a, d_a, o, d_o = _setup_id_each(dependencies, model_object, new_path,
                                        attr_path, attr_params)
        attrs += a
        deps_attrs += d_a
        objects += o
        deps_objects += d_o
      end
      attrs.uniq!
      deps_attrs.uniq!
      objects.uniq!
      deps_objects.uniq!
      _sid_show_debug(3, format("'%s' has ", object_type) + '%s',
                      attrs, objects)
      _sid_show_debug(4, format("'%s' has ", object_type) + 'also indirect %s',
                      deps_attrs, deps_objects)
      [(objects + deps_objects).uniq, attrs, deps_attrs]
    end
def _setup_identify_deps ( dependencies , object_type , path = [ ] ) model_object = dependencies . rh_get ( :objects , object_type ) objects_list = PrcLib . model . meta_obj . rh_get ( object_type , :params , :keys ) if objects_list . nil? PrcLib . warning ( "'%s' as object type is not valid. Not declared." ) return [ [ ] , [ ] , [ ] ] end objects = [ ] attrs = [ ] deps_attrs = [ ] deps_objects = [ ] new_path = path + [ object_type ] objects_list . each do | attr_path , attr_params | a , d_a , o , d_o = _setup_id_each ( dependencies , model_object , new_path , attr_path , attr_params ) attrs += a deps_attrs += d_a objects += o deps_objects += d_o end attrs . uniq! deps_attrs . uniq! objects . uniq! deps_objects . uniq! _sid_show_debug ( 3 , format ( "'%s' has " , object_type ) + '%s' , attrs , objects ) _sid_show_debug ( 4 , format ( "'%s' has " , object_type ) + 'also indirect %s' , deps_attrs , deps_objects ) [ ( objects + deps_objects ) . uniq , attrs , deps_attrs ] end
Internal setup function to parse objects/attributes dependency list
and build objects list and required attributes list.
Internal setup function to parse objects / attributes dependency list and build objects list and required attributes list .
dependencies
<not_specific>
object_type
<not_specific>
path
<not_specific>