Class: Bosh::Cli::JobPropertyCollection
- Includes:
- Template::PropertyHelper, Enumerable
- Defined in:
- lib/cli/job_property_collection.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(job, global_properties, job_properties, mappings) ⇒ JobPropertyCollection
constructor
A new instance of JobPropertyCollection.
-
#to_hash ⇒ Hash
Property hash (keys are property name components).
Constructor Details
#initialize(job, global_properties, job_properties, mappings) ⇒ JobPropertyCollection
Returns a new instance of JobPropertyCollection.
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/cli/job_property_collection.rb', line 15 def initialize(job, global_properties, job_properties, mappings) @job = job @job_properties = Bosh::Common::DeepCopy.copy(job_properties || {}) merge(@job_properties, Bosh::Common::DeepCopy.copy(global_properties)) @mappings = mappings || {} @properties = [] resolve_mappings filter_properties end |
Instance Method Details
#each ⇒ Object
28 29 30 |
# File 'lib/cli/job_property_collection.rb', line 28 def each @properties.each { |property| yield property } end |
#to_hash ⇒ Hash
Returns Property hash (keys are property name components).
33 34 35 |
# File 'lib/cli/job_property_collection.rb', line 33 def to_hash @properties end |