lib/dependor/auto_inject.rb in dependor-1.0.0 vs lib/dependor/auto_inject.rb in dependor-1.0.1

- old
+ new

@@ -22,17 +22,21 @@ auto_injector.class_exists?(name) end def inject(klass, overrides = {}) injector = Dependor::CustomizedInjector.new(auto_injector, overrides) - instantiator = Dependor::Instantiator.new(injector) + instantiator = Dependor::Instantiator.new(injector, dependency_names) instantiator.instantiate(klass) end private def auto_injector - @auto_injector ||= Dependor::AutoInjector.new(self, self.class.search_modules) + @auto_injector ||= Dependor::AutoInjector.new(self, dependency_names, self.class.search_modules) + end + + def dependency_names + @dependency_names ||= Dependor::DependencyNamesCache.new end end end