189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
# File 'lib/vendor/puppet/provider/parsedfile.rb', line 189
def self.match_providers_with_resources(resources)
return unless resources
matchers = resources.dup
@records.each do |record|
next if skip_record?(record)
if name = record[:name] and resource = resources[name]
resource.provider = new(record)
elsif respond_to?(:match)
if resource = match(record, matchers)
matchers.delete(resource.title)
record[:name] = resource[:name]
resource.provider = new(record)
end
end
end
end
|