Class: PuppetX::Relay::Util::OverlaySettings
- Inherits:
-
Settings
- Object
- Settings
- PuppetX::Relay::Util::OverlaySettings
show all
- Defined in:
- lib/puppet_x/relay/util/settings.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of OverlaySettings.
54
55
56
57
|
# File 'lib/puppet_x/relay/util/settings.rb', line 54
def initialize(parent, config)
@parent = parent
@config = config
end
|
Instance Method Details
#[](key) ⇒ Object
59
60
61
|
# File 'lib/puppet_x/relay/util/settings.rb', line 59
def [](key)
@config.include?(key) ? @config[key] : @parent[key]
end
|
#each(&block) ⇒ Object
63
64
65
66
67
68
|
# File 'lib/puppet_x/relay/util/settings.rb', line 63
def each(&block)
return enum_for(:each) unless block_given?
@config.each(&block)
@parent.each { |key, value| yield key, value unless @config.include?(key) }
end
|