Class: Puppet::Settings::ConfigFile::Section Private

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

Overview

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.

API:

  • private

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Section

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 Section.

API:

  • private



51
52
53
# File 'lib/puppet/settings/config_file.rb', line 51

def initialize(name)
  super(name, [])
end

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • the current value of name



50
51
52
# File 'lib/puppet/settings/config_file.rb', line 50

def name
  @name
end

#settingsObject

Returns the value of attribute settings

Returns:

  • the current value of settings



50
51
52
# File 'lib/puppet/settings/config_file.rb', line 50

def settings
  @settings
end

Instance Method Details

#setting(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.

API:

  • private



60
61
62
# File 'lib/puppet/settings/config_file.rb', line 60

def setting(name)
  settings.find { |setting| setting.name == name }
end

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

API:

  • private



55
56
57
58
# File 'lib/puppet/settings/config_file.rb', line 55

def with_setting(name, value, meta)
  settings << Setting.new(name, value, meta)
  self
end