Method: Puppet::Provider::ParsedFile#flush

Defined in:
lib/vendor/puppet/provider/parsedfile.rb

#flushObject

Write our data to disk.



328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
# File 'lib/vendor/puppet/provider/parsedfile.rb', line 328

def flush
  # Make sure we've got a target and name set.

  # If the target isn't set, then this is our first modification, so
  # mark it for flushing.
  unless @property_hash[:target]
    @property_hash[:target] = @resource.should(:target) || self.class.default_target
    self.class.modified(@property_hash[:target])
  end
  @resource.class.key_attributes.each do |attr|
    @property_hash[attr] ||= @resource[attr]
  end

  self.class.flush(@property_hash)

  #@property_hash = {}
end