Class: Bosh::Cli::JobPropertyCollection

Inherits:
Object
  • Object
show all
Includes:
Bosh::Common::PropertyHelper, Enumerable
Defined in:
lib/cli/job_property_collection.rb

Instance Method Summary collapse

Constructor Details

#initialize(job_builder, global_properties, job_properties, mappings) ⇒ JobPropertyCollection



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/cli/job_property_collection.rb', line 14

def initialize(job_builder, global_properties, job_properties, mappings)
  @job_builder = job_builder

  @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

#eachObject



27
28
29
# File 'lib/cli/job_property_collection.rb', line 27

def each
  @properties.each { |property| yield property }
end

#to_hashHash



32
33
34
# File 'lib/cli/job_property_collection.rb', line 32

def to_hash
  @properties
end