lib/puppet/parser/compiler.rb
# Evaluate our collections and return true if anything returned an object.
# The 'true' is used to continue a loop, so it's important.
Evaluate our collections and return true if anything returned an object.
The 'true' is used to continue a loop, so it's important.
Evaluate our collections and return true if anything returned an object . The ' true ' is used to continue a loop so it ' s important .
def evaluate_collections
    return false if @collections.empty?
    exceptwrap do
      Puppet::Util::Profiler.profile("Evaluated collections") do
        found_something = false
        @collections.dup.each do |collection|
          found_something = true if collection.evaluate
        end
        found_something
      end
    end
  end
def evaluate_collections return false if @collections . empty? exceptwrap do Puppet :: Util :: Profiler . profile ( "Evaluated collections" ) do found_something = false @collections . dup . each do | collection | found_something = true if collection . evaluate end found_something end end end
Evaluate our collections and return true if anything returned an object.
Evaluate our collections and return true if anything returned an object .
# We have to iterate over a dup of the array because # collections can delete themselves from the list, which # changes its length and causes some collections to get missed.