# File lib/puppet/resource/type_collection.rb, line 31 31: def add(instance) 32: if instance.type == :hostclass and other = @hostclasses[instance.name] and other.type == :hostclass 33: other.merge(instance) 34: return other 35: end 36: method = "add_#{instance.type}" 37: send(method, instance) 38: instance.resource_type_collection = self 39: instance 40: end