Class: Puppet::Settings::ConfigFile::Section Private
- Defined in:
- lib/puppet/settings/config_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 Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#settings ⇒ Object
Returns the value of attribute settings.
Instance Method Summary collapse
-
#initialize(name) ⇒ Section
constructor
private
A new instance of Section.
- #setting(name) ⇒ Object private
- #with_setting(name, value, meta) ⇒ Object private
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.
58 59 60 |
# File 'lib/puppet/settings/config_file.rb', line 58 def initialize(name) super(name, []) end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
57 58 59 |
# File 'lib/puppet/settings/config_file.rb', line 57 def name @name end |
#settings ⇒ Object
Returns the value of attribute settings
57 58 59 |
# File 'lib/puppet/settings/config_file.rb', line 57 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.
67 68 69 |
# File 'lib/puppet/settings/config_file.rb', line 67 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.
62 63 64 65 |
# File 'lib/puppet/settings/config_file.rb', line 62 def with_setting(name, value, ) settings << Setting.new(name, value, ) self end |