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.
- #inspect ⇒ Object private
- #lookup(name) ⇒ Object private
- #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.
1425 1426 1427 |
# File 'lib/puppet/settings.rb', line 1425 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.
1445 1446 1447 1448 1449 |
# File 'lib/puppet/settings.rb', line 1445 def conf @conf ||= if environments = Puppet.lookup(:environments) { nil } environments.get_conf(@environment_name) end 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.
1433 1434 1435 1436 1437 1438 |
# File 'lib/puppet/settings.rb', line 1433 def include?(name) if Puppet::Settings::EnvironmentConf::VALID_SETTINGS.include?(name) && conf return true end false end |
#inspect ⇒ 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.
1451 1452 1453 |
# File 'lib/puppet/settings.rb', line 1451 def inspect %Q{<#{self.class}:#{self.object_id} @environment_name="#{@environment_name}" @conf="#{@conf}">} 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.
1440 1441 1442 1443 |
# File 'lib/puppet/settings.rb', line 1440 def lookup(name) return nil unless Puppet::Settings::EnvironmentConf::VALID_SETTINGS.include?(name) conf.send(name) if conf end |
#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.
1429 1430 1431 |
# File 'lib/puppet/settings.rb', line 1429 def name @environment_name end |