Class: Aws::Templates::Utils::Parametrized::Transformation::AsChain

Inherits:
Aws::Templates::Utils::Parametrized::Transformation show all
Defined in:
lib/aws/templates/utils/parametrized/transformation/as_chain.rb

Overview

Apply several transformation sequentially

Useful when a few transformations need to be applied to a single value to get the final result

Example

class Piece
  include Aws::Templates::Utils::Parametrized

  parameter :param,
    transform: as_chain(
                 as_hash,
                 as_object(Aws::Templates::Utils::AsNamed)
               )
end

i = Piece.new(param: [:name, 'Rex'])
i.param.name # => 'Rex'

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Aws::Templates::Utils::Parametrized::Transformation

#to_proc, #transform_wrapper

Constructor Details

#initialize(components) ⇒ AsChain

Returns a new instance of AsChain.



31
32
33
# File 'lib/aws/templates/utils/parametrized/transformation/as_chain.rb', line 31

def initialize(components)
  @components = _check_components(components)
end

Instance Attribute Details

#componentsObject (readonly)

Returns the value of attribute components.



29
30
31
# File 'lib/aws/templates/utils/parametrized/transformation/as_chain.rb', line 29

def components
  @components
end