Method: Puppet::Util::IniConfig::Section#format
- Defined in:
- lib/puppet/util/inifile.rb
#format ⇒ Object
Format the section as text in the way it should be written to file
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/puppet/util/inifile.rb', line 81 def format if @destroy text = ''.dup else text = "[#{name}]\n" @entries.each do |entry| if entry.is_a?(Array) key, value = entry text << "#{key}=#{value}\n" unless value.nil? else text << entry end end end text end |