Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
diff --git a/lib/puppet/parser/collector.rb b/lib/puppet/parser/collector.rb index 2699dc6..c3bdce9 100644 --- a/lib/puppet/parser/collector.rb +++ b/lib/puppet/parser/collector.rb @@ -132,7 +132,13 @@ class Puppet::Parser::Collector method = :virtual? end scope.compiler.resources.find_all do |resource| - resource.type == @type and resource.send(method) and match?(resource) + if resource.is_a?(Array) + resource.each do |r| + r.type == @type and r.send(method) and match?(r) + end + else + resource.type == @type and resource.send(method) and match?(resource) + end end end
This paste will be private.
From the Design Piracy series on my blog: