Sha256: 5d815e736e6ea8ad32b718d6a40b9d2e916d836ae73f06284f6408e507132bde
Contents?: true
Size: 719 Bytes
Versions: 88
Compression:
Stored size: 719 Bytes
Contents
require 'rubypitaya/core/path' require 'rubypitaya/core/initializer_base' module RubyPitaya class InitializerBroadcast def run(initializer_content) app_classes = [] plugin_classes = [] ObjectSpace.each_object(InitializerBase.singleton_class) do |klass| is_plugin_class = klass.path.include?('plugins') if is_plugin_class plugin_classes << klass else app_classes << klass end end plugin_classes.each do |klass| instance = klass.new instance.run(initializer_content) end app_classes.each do |klass| instance = klass.new instance.run(initializer_content) end end end end
Version data entries
88 entries across 84 versions & 1 rubygems