Class: Feedbook::PluginsManager

Inherits:
Object
  • Object
show all
Defined in:
lib/feedbook/plugins_manager.rb

Class Method Summary collapse

Class Method Details

.load_plugins(path) ⇒ NilClass

Loads plugins and extensions from given path.

Parameters:

  • path (String)

    plugins directory path

Returns:

  • (NilClass)

    nil



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/feedbook/plugins_manager.rb', line 8

def self.load_plugins(path)
  print "Loading plugins from #{path}... "
  if File.directory? path
    Dir[File.join(path, '**', '*.rb')].sort.each do |f|
      require f
    end
    puts 'completed.'
  else
    puts "Plugins directory could not be found in #{path}."
  end
end