Class: Guard::Bosh::EffectivePropertiesCalculator
- Inherits:
-
Object
- Object
- Guard::Bosh::EffectivePropertiesCalculator
- Defined in:
- lib/guard/bosh/effective_properties_calculator.rb
Overview
The effective set of properties is the union of:
-
The default properties declared in the job spec
-
The properties declared at the top-level of the manifest
-
The properties declared at the job-level of the manifest
Instance Method Summary collapse
- #calculate_effective_properties(job) ⇒ Object
-
#initialize(loaders:) ⇒ EffectivePropertiesCalculator
constructor
A new instance of EffectivePropertiesCalculator.
Constructor Details
#initialize(loaders:) ⇒ EffectivePropertiesCalculator
Returns a new instance of EffectivePropertiesCalculator.
10 11 12 |
# File 'lib/guard/bosh/effective_properties_calculator.rb', line 10 def initialize(loaders:) @loaders = loaders end |
Instance Method Details
#calculate_effective_properties(job) ⇒ Object
14 15 16 17 18 |
# File 'lib/guard/bosh/effective_properties_calculator.rb', line 14 def calculate_effective_properties(job) @loaders.inject({}) do |result, loader| result.deep_merge!(loader.load_properties(job)) end end |