Method: Roby::Application#auto_require_models

Defined in:
lib/roby/app.rb

#auto_require_modelsObject



1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
# File 'lib/roby/app.rb', line 1971

def auto_require_models
    # Require all common task models and the task models specific to
    # this robot
    if auto_load_models?
        load_all_model_files_in("tasks")

        if backward_compatible_naming?
            search_path = self.auto_load_search_path
            all_files = find_files_in_dirs("tasks", "ROBOT", path: search_path, all: true, order: :specific_last, pattern: /\.rb$/)
            all_files.each do |p|
                require(p)
            end
        end
        call_plugins(:auto_require_models, self)
    end
end