lib/model/the_class.rb
requires the file specified in the model-dir

In fact, the model-files are loaded instead of required. After recreation of a class (Class.delete_class, 
ORD.create_class classname) custom methods declared in the model files are present. Required modelfiles are
gone, if the class is destroyed, but the interpreter thinks, they have already been required. Rebuilding the 
class does not reestablish the connection to the required model file.

Actual only a flat directory is supported. However -the Parameter model has the format: [ superclass, class ]. Its possible to extend the method adress a model-tree.
requires the file specified in the model-dir
In fact, the model-files are loaded instead of required. After recreation of a class (Class.delete_class,
ORD.create_class classname) custom methods declared in the model files are present. Required modelfiles are
gone, if the class is destroyed, but the interpreter thinks, they have already been required. Rebuilding the
class does not reestablish the connection to the required model file.

Actual only a flat directory is supported. However -the Parameter model has the format: [ superclass, class ]. Its possible to extend the method adress a model-tree.
requires the file specified in the model - dir In fact the model - files are loaded instead of required . After recreation of a class ( Class . delete_class ORD . create_class classname ) custom methods declared in the model files are present . Required modelfiles are gone if the class is destroyed but the interpreter thinks they have already been required . Rebuilding the class does not reestablish the connection to the required model file . Actual only a flat directory is supported . However - the Parameter model has the format : [ superclass class ] . Its possible to extend the method adress a model - tree .
def require_model_file  dir=nil
  logger.progname = 'ModelClassRequireModelFile'
  dir = dir.presence ||  ActiveOrient::Model.model_dir 
  if File.exists?( dir )
    model= model.flatten.last if model.is_a?( Array )
    filename =   dir + "/" + self.to_s.underscore + '.rb'
    if  File.exists?(filename )
      if load filename
	logger.info{ "{filename} sucessfully loaded"  }
	self 
      else
	logger.error{ "{filename} load error" }
	nil 
      end
    else
      logger.info{ "model-file not present: {filename}" }
      nil 
    end
  else
    logger.info{ "Directory { dir  } not present " }
    nil  
  end
rescue TypeError => e
     puts "TypeError:  {e.message}" 
     puts "Working on {self.to_s} -> {self.superclass}"
     puts "Class_hierarchy: {orientdb.class_hierarchy.inspect}."
     print e.backtrace.join("\n") 
     raise
end
def require_model_file dir = nil logger . progname = 'ModelClass#RequireModelFile' dir = dir . presence || ActiveOrient :: Model . model_dir if File . exists? ( dir ) model = model . flatten . last if model . is_a? ( Array ) filename = dir + "/" + self . to_s . underscore + '.rb' if File . exists? ( filename ) if load filename logger . info { "#{filename} sucessfully loaded" } self else logger . error { "#{filename} load error" } nil end else logger . info { "model-file not present: #{filename}" } nil end else logger . info { "Directory #{ dir  } not present " } nil end rescue TypeError => e puts "TypeError:  #{e.message}" puts "Working on #{self.to_s} -> #{self.superclass}" puts "Class_hierarchy: #{orientdb.class_hierarchy.inspect}." print e . backtrace . join ( "\n" ) raise end
requires the file specified in the model-dir
In fact, the model-files are loaded instead of required.
requires the file specified in the model - dir In fact the model - files are loaded instead of required .
#return_value #return_value #return_value #return_value #
dir
<not_specific>