Method: Puppet::Settings::IniFile#write
- Defined in:
- lib/puppet/settings/ini_file.rb
#write(fh) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/puppet/settings/ini_file.rb', line 107 def write(fh) # If no real section line for the default section exists, configure the # DefaultSection object to write its section line. (DefaultSection objects # don't write the section line unless explicitly configured to do so) if settings_exist_in_default_section? && !section_exists_with_default_section_name? set_default_section_write_sectionline(true) end fh.truncate(0) fh.rewind @lines.each do |line| line.write(fh) end fh.flush end |