Sha256: de902eb7513678fec88c697f2902e874a7f29835445f6c6b769cfcccd724cf3f
Contents?: true
Size: 711 Bytes
Versions: 11
Compression:
Stored size: 711 Bytes
Contents
# # A thin wrapper around ActiveSupport::Autoload configured to always eager_load # a child. By calling `load_all!` on the namespace module, all children will # be eager loaded, allowing us to more easily operate in a multi-threaded # environment. # module XDR::Namespace extend ActiveSupport::Concern included do extend ActiveSupport::Autoload end module ClassMethods def load_all! constants.each do |const_name| begin const = const_get const_name const.public_send :load_all! if const.respond_to? :load_all! rescue NameError => e raise e unless e.message =~ /uninitialized constant #{const_name}/ end end end end end
Version data entries
11 entries across 11 versions & 2 rubygems