Server IP : 111.118.215.189 / Your IP : 18.221.192.226 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/ruby/vendor_ruby/puppet/pops/evaluator/collectors/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
class Puppet::Pops::Evaluator::Collectors::CatalogCollector < Puppet::Pops::Evaluator::Collectors::AbstractCollector # Creates a CatalogCollector using the AbstractCollector's # constructor to set the scope and overrides # # param [Symbol] type the resource type to be collected # param [Proc] query the query which defines which resources to match def initialize(scope, type, query, overrides = nil) super(scope, overrides) @query = query @type = Puppet::Resource.new(type, "whatever").type end # Collects virtual resources based off a collection in a manifest def collect t = @type q = @query scope.compiler.resources.find_all do |resource| resource.type == t && (q ? q.call(resource) : true) end end end