lib/registry.rb in regstry-1.0.0 vs lib/registry.rb in regstry-1.0.1

- old
+ new

@@ -83,11 +83,11 @@ def [](key) registry[key&.to_sym] || fail(MSGS[:unknown] % [key, registry.keys.sort]) end - def registry - @registry ||= registries.registry(registry_name) + def registry(name = nil) + name ? registry_name(name) : @registry ||= registries.registry(registry_name) end def registry_name(name = nil) name.nil? ? @registry_name ||= superclass.registry_name : @registry_name = name end