Class: Sfn::Utils::StackParameterScrubber
- Inherits:
-
Object
- Object
- Sfn::Utils::StackParameterScrubber
- Defined in:
- lib/sfn/utils/stack_parameter_scrubber.rb
Overview
Helper for scrubbing stack parameters
Constant Summary collapse
- ALLOWED_PARAMETER_ATTRIBUTES =
Validate attributes within Parameter blocks
%w( Type Default NoEcho AllowedValues AllowedPattern MaxLength MinLength MaxValue MinValue Description ConstraintDescription )
Class Method Summary collapse
-
.scrub!(template) ⇒ Hash
Clean the parameters of the template.
Class Method Details
.scrub!(template) ⇒ Hash
Clean the parameters of the template
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/sfn/utils/stack_parameter_scrubber.rb', line 21 def scrub!(template) parameters = template['Parameters'] if(parameters) parameters.each do |name, | .delete_if do |attribute, value| !ALLOWED_PARAMETER_ATTRIBUTES.include?(attribute) end end template['Parameters'] = parameters end template end |