Class: SimpleDeploy::StackAttributeFormatter
- Inherits:
-
Object
- Object
- SimpleDeploy::StackAttributeFormatter
- Defined in:
- lib/simple_deploy/stack/stack_attribute_formatter.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ StackAttributeFormatter
constructor
A new instance of StackAttributeFormatter.
- #updated_attributes(attributes) ⇒ Object
Constructor Details
#initialize(args) ⇒ StackAttributeFormatter
Returns a new instance of StackAttributeFormatter.
4 5 6 7 8 9 |
# File 'lib/simple_deploy/stack/stack_attribute_formatter.rb', line 4 def initialize(args) @config = SimpleDeploy.config @logger = SimpleDeploy.logger @main_attributes = args[:main_attributes] @region = @config.region end |
Instance Method Details
#updated_attributes(attributes) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/simple_deploy/stack/stack_attribute_formatter.rb', line 11 def updated_attributes(attributes) @provided_attributes = attributes updates = [] @provided_attributes.each do |attrhash| key = attrhash.keys.first if artifact_names.include? key url_hash = cloud_formation_url attrhash, @provided_attributes updates << url_hash @logger.info "Adding artifact attribute: #{url_hash}" end end @provided_attributes + updates end |