Method: Puppet::ConfineCollection#summary

Defined in:
lib/puppet/confine_collection.rb

#summaryObject

Return a hash of the whole confine set, used for the Provider reference.



35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/puppet/confine_collection.rb', line 35

def summary
  confines = Hash.new { |hash, key| hash[key] = [] }
  @confines.each { |confine| confines[confine.class] << confine }
  result = {}
  confines.each do |klass, list|
    value = klass.summarize(list)
    next if (value.respond_to?(:length) and value.length == 0) or (value == 0)
    result[klass.name] = value

  end
  result
end