Class: SimpleDeploy::Stack::OutputMapper
- Inherits:
-
Object
- Object
- SimpleDeploy::Stack::OutputMapper
- Defined in:
- lib/simple_deploy/stack/output_mapper.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ OutputMapper
constructor
A new instance of OutputMapper.
- #map_outputs_from_stacks(args) ⇒ Object
Constructor Details
#initialize(args) ⇒ OutputMapper
Returns a new instance of OutputMapper.
5 6 7 8 |
# File 'lib/simple_deploy/stack/output_mapper.rb', line 5 def initialize(args) @environment = args[:environment] @logger = SimpleDeploy.logger end |
Instance Method Details
#map_outputs_from_stacks(args) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/simple_deploy/stack/output_mapper.rb', line 10 def map_outputs_from_stacks(args) @stacks = args[:stacks] @template = args[:template] @results = {} merge_stacks_outputs pluralize_keys prune_unused_parameters @results.each_pair do |key, value| @logger.info "Mapping output '#{key}' to input parameter with value '#{value}'." end @results.map { |x| { x.first => x.last } } end |