Class: Puppet::Settings::FileSetting::Service Private
- Defined in:
- lib/puppet/settings/file_setting.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.
A “service” user or group that picks up values from settings when the referenced user or group is safe to use (it exists or will be created), and uses the given fallback value when not safe.
Instance Method Summary collapse
-
#initialize(name, fallback, settings, available_method) ⇒ Service
constructor
private
A new instance of Service.
- #value ⇒ Object private
Constructor Details
#initialize(name, fallback, settings, available_method) ⇒ Service
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 Service.
37 38 39 40 41 42 |
# File 'lib/puppet/settings/file_setting.rb', line 37 def initialize(name, fallback, settings, available_method) @settings = settings @available_method = available_method @name = name @fallback = fallback end |
Instance Method Details
#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.
44 45 46 47 48 49 50 |
# File 'lib/puppet/settings/file_setting.rb', line 44 def value if safe_to_use_settings_value? @settings[@name] else @fallback end end |