Class: Aws::Templates::Utils::Parametrized::Transformation::AsChain
- Inherits:
-
Aws::Templates::Utils::Parametrized::Transformation
- Object
- Aws::Templates::Utils::Parametrized::Transformation
- Aws::Templates::Utils::Parametrized::Transformation::AsChain
- 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
-
#components ⇒ Object
readonly
Returns the value of attribute components.
Instance Method Summary collapse
-
#initialize(components) ⇒ AsChain
constructor
A new instance of AsChain.
Methods inherited from Aws::Templates::Utils::Parametrized::Transformation
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
#components ⇒ Object (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 |