Method: Roby::Application#load_plugins_from_prefix
- Defined in:
- lib/roby/app.rb
#load_plugins_from_prefix(dir) ⇒ Object
Looks into subdirectories of dir for files called app.rb and registers them as Roby plugins
1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 |
# File 'lib/roby/app.rb', line 1344 def load_plugins_from_prefix(dir) dir = File.(dir) $LOAD_PATH.unshift dir Dir.new(dir).each do |subdir| subdir = File.join(dir, subdir) next unless File.directory?(subdir) appfile = File.join(subdir, "app.rb") next unless File.file?(appfile) load_plugin_file(appfile) end ensure $LOAD_PATH.shift end |