Class: PuppetX::Relay::Util::FileSettings
- Inherits:
- 
      OverlaySettings
      
        - Object
- Settings
- OverlaySettings
- PuppetX::Relay::Util::FileSettings
 
- Defined in:
- lib/puppet_x/relay/util/settings.rb
Defined Under Namespace
Classes: HieraConfigurationError
Instance Attribute Summary collapse
- 
  
    
      #file  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute file. 
Instance Method Summary collapse
- 
  
    
      #initialize(parent, file: nil)  ⇒ FileSettings 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of FileSettings. 
Methods inherited from OverlaySettings
Methods inherited from Settings
Constructor Details
#initialize(parent, file: nil) ⇒ FileSettings
Returns a new instance of FileSettings.
| 77 78 79 80 81 82 | # File 'lib/puppet_x/relay/util/settings.rb', line 77 def initialize(parent, file: nil) file ||= File.join(Puppet[:confdir], 'relay.yaml') super(parent, maybe_from_eyaml(YAML.load_file(file)).transform_keys(&:to_sym)) rescue Errno::ENOENT super(parent, {}) end | 
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
| 74 75 76 | # File 'lib/puppet_x/relay/util/settings.rb', line 74 def file @file end |