fluke/devops-service/loader.rb
2015-01-27 13:18:26 +03:00

20 lines
401 B
Ruby

module Devops
module Loader
class << self
def plugins config
if defined?(Devops::Plugin)
routes = {}
plugins = Devops::Plugin.constants.collect{|s| Devops::Plugin.const_get(s)}.select {|const| const.class == Module}
puts plugins.inspect
plugins.each do |p|
p.init(config)
end
end
end
end
end
end