Sha256: 89a2e458100bb0108501510591bd7ad9ba6143d609ab6c5c90641d8a2fe5aa7e
Contents?: true
Size: 681 Bytes
Versions: 197
Compression:
Stored size: 681 Bytes
Contents
# frozen_string_literal: true require 'set' module Aws # @api private class EagerLoader def initialize @loaded = Set.new end # @return [Set<Module>] attr_reader :loaded # @param [Module] klass_or_module # @return [self] def load(klass_or_module) @loaded << klass_or_module klass_or_module.constants.each do |const_name| path = klass_or_module.autoload?(const_name) begin require(path) if path const = klass_or_module.const_get(const_name) self.load(const) if Module === const && !@loaded.include?(const) rescue LoadError end end self end end end
Version data entries
197 entries across 197 versions & 1 rubygems