fluke/devops-service/loader.rb

20 lines
401 B
Ruby
Raw Normal View History

2014-12-22 14:22:04 +03:00
module Devops
module Loader
2015-01-27 13:18:26 +03:00
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
2014-12-22 14:22:04 +03:00
end
2015-01-27 13:18:26 +03:00
2014-12-22 14:22:04 +03:00
end
end
end
end