Method: Puppet::Type#uniqueness_key
- Defined in:
- lib/puppet/type.rb
#uniqueness_key ⇒ Object
Produces a resource’s uniqueness_key (or composite key). This key is an array of all key attributes’ values. Each distinct tuple must be unique for each resource type.
445 446 447 |
# File 'lib/puppet/type.rb', line 445 def uniqueness_key self.class.key_attributes.sort_by(&:to_s).map { |attribute_name| self[attribute_name] } end |