Class: Puppet::Settings::IniFile::Manipulator Private

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/settings/ini_file.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Manipulator

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.

Returns a new instance of Manipulator.



89
90
91
# File 'lib/puppet/settings/ini_file.rb', line 89

def initialize(config)
  @config = config
end

Instance Method Details

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



93
94
95
96
97
98
99
100
# File 'lib/puppet/settings/ini_file.rb', line 93

def set(section, name, value)
  setting = @config.setting(section, name)
  if setting
    setting.value = value
  else
    add_setting(section, name, value)
  end
end