Method: Puppet::Settings::IniFile#delete

Defined in:
lib/puppet/settings/ini_file.rb

#delete(section, name) ⇒ 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.



39
40
41
42
43
44
45
46
# File 'lib/puppet/settings/ini_file.rb', line 39

def delete(section, name)
  delete_offset = @lines.index(setting(section, name))
  next_offset = delete_offset + 1
  if next_offset < @lines.length
    @lines[next_offset].previous = @lines[delete_offset].previous
  end
  @lines.delete_at(delete_offset)
end