lib/dim.rb in dim-1.2.0 vs lib/dim.rb in dim-1.2.2
- old
+ new
@@ -95,9 +95,14 @@
# found in the container or its parents.
def service_block(name)
@services[name] || @parent.service_block(name)
end
+ # Resets the cached services
+ def clear_cache!
+ @cache = {}
+ end
+
# Searching for a service block only reaches the Container class
# when all the containers in the hierarchy search chain have no
# entry for the service. In this case, the only thing to do is
# signal a failure.
def self.service_block(name)