Module: Mantra::Manifest::Ext::InstanceMethods
- Defined in:
- lib/mantra/manifest/ext.rb
Instance Method Summary collapse
Instance Method Details
#jobs ⇒ Object
27 28 29 |
# File 'lib/mantra/manifest/ext.rb', line 27 def jobs self.root.content.hash? ? self.root.content.content["jobs"] : nil end |
#properties ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/mantra/manifest/ext.rb', line 14 def properties job_properties = Element.create({}).content job_properties_array = self.jobs.map do |job| job.hash? ? job.content["properties"] : nil end.compact job_properties_array.each do |jp| job_properties.merge(jp) end manifest_properties = self.root.child.hash? ? self.root.child.content["properties"] : Element.create({}).content manifest_properties.merge(job_properties) Element.create(manifest_properties) end |