diff options
-rw-r--r-- | lib/puppet/metatype/instances.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/puppet/metatype/instances.rb b/lib/puppet/metatype/instances.rb index a26c30686..351f4c580 100644 --- a/lib/puppet/metatype/instances.rb +++ b/lib/puppet/metatype/instances.rb @@ -6,13 +6,7 @@ class Puppet::Type # retrieve a named instance of the current type def self.[](name) - if @objects.has_key?(name) - return @objects[name] - elsif @aliases.has_key?(name) - return @aliases[name] - else - return nil - end + @objects[name] || @aliases[name] end # add an instance by name to the class list of instances |