Class: Puppet::Settings::ValuesFromEnvironmentConf Private
- Defined in:
- lib/puppet/settings.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
- #conf ⇒ Object private
- #include?(name) ⇒ Boolean private
-
#initialize(environment_name) ⇒ ValuesFromEnvironmentConf
constructor
private
A new instance of ValuesFromEnvironmentConf.
- #lookup(name) ⇒ Object private
Constructor Details
#initialize(environment_name) ⇒ ValuesFromEnvironmentConf
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 ValuesFromEnvironmentConf.
1347 1348 1349 |
# File 'lib/puppet/settings.rb', line 1347 def initialize(environment_name) @environment_name = environment_name end |
Instance Method Details
#conf ⇒ 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.
1363 1364 1365 1366 1367 1368 1369 1370 |
# File 'lib/puppet/settings.rb', line 1363 def conf unless @conf if environments = Puppet.lookup(:environments) @conf = environments.get_conf(@environment_name) end end return @conf end |
#include?(name) ⇒ Boolean
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.
1351 1352 1353 1354 1355 1356 |
# File 'lib/puppet/settings.rb', line 1351 def include?(name) if Puppet::Settings::EnvironmentConf::VALID_SETTINGS.include?(name) && conf return true end false end |
#lookup(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.
1358 1359 1360 1361 |
# File 'lib/puppet/settings.rb', line 1358 def lookup(name) return nil unless Puppet::Settings::EnvironmentConf::VALID_SETTINGS.include?(name) conf.send(name) if conf end |