Class: Dev::Aws::Cloudformation::Parameters
- Defined in:
- lib/firespring_dev_commands/aws/cloudformation/parameters.rb
Overview
Class which contains Parameters for a Aws cloudformation stack
Instance Attribute Summary collapse
-
#parameters ⇒ Object
Returns the value of attribute parameters.
Instance Method Summary collapse
-
#default ⇒ Object
Returns the given parameters in their default format.
-
#initialize(parameters = {}) ⇒ Parameters
constructor
A new instance of Parameters.
-
#preserve ⇒ Object
Returns the given parameters all set to use the previous values specified in their templates.
Constructor Details
#initialize(parameters = {}) ⇒ Parameters
Returns a new instance of Parameters.
8 9 10 11 12 |
# File 'lib/firespring_dev_commands/aws/cloudformation/parameters.rb', line 8 def initialize(parameters = {}) raise 'parameters should be a hash' unless parameters.is_a?(Hash) @parameters = parameters end |
Instance Attribute Details
#parameters ⇒ Object
Returns the value of attribute parameters.
6 7 8 |
# File 'lib/firespring_dev_commands/aws/cloudformation/parameters.rb', line 6 def parameters @parameters end |
Instance Method Details
#default ⇒ Object
Returns the given parameters in their default format. Can be passed to a create or update command
15 16 17 |
# File 'lib/firespring_dev_commands/aws/cloudformation/parameters.rb', line 15 def default parameters.map { |k, v| {parameter_key: k, parameter_value: v} } end |
#preserve ⇒ Object
Returns the given parameters all set to use the previous values specified in their templates
20 21 22 |
# File 'lib/firespring_dev_commands/aws/cloudformation/parameters.rb', line 20 def preserve parameters.map { |k, _| {parameter_key: k, use_previous_value: true} } end |