Class: Bosh::Cli::JobPropertyCollection
- Includes:
- Bosh::Common::PropertyHelper, Enumerable
- Defined in:
- lib/cli/job_property_collection.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(job_builder, 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_builder, global_properties, job_properties, mappings) ⇒ JobPropertyCollection
Returns a new instance of JobPropertyCollection.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/cli/job_property_collection.rb', line 12 def initialize(job_builder, global_properties, job_properties, mappings) @job_builder = job_builder @job_properties = deep_copy(job_properties || {}) merge(@job_properties, deep_copy(global_properties)) @mappings = mappings || {} @properties = [] resolve_mappings filter_properties end |
Instance Method Details
#each ⇒ Object
25 26 27 |
# File 'lib/cli/job_property_collection.rb', line 25 def each @properties.each { |property| yield property } end |
#to_hash ⇒ Hash
Returns Property hash (keys are property name components).
30 31 32 |
# File 'lib/cli/job_property_collection.rb', line 30 def to_hash @properties end |