Class: Kitchen::Terraform::SystemAttrsInputsResolver
- Inherits:
-
Object
- Object
- Kitchen::Terraform::SystemAttrsInputsResolver
- Defined in:
- lib/kitchen/terraform/system_attrs_inputs_resolver.rb
Overview
SystemAttrsInputsResolver is the class of objects which resolve for systems the attributes derived from Terraform variables.
Instance Method Summary collapse
-
#initialize(attrs:) ⇒ Kitchen::Terraform::SystemAttrsInputsResolver
constructor
#initialize prepares a new instance of the class.
-
#resolve(inputs:) ⇒ Object
#resolve stores the inputs as attributes.
Constructor Details
#initialize(attrs:) ⇒ Kitchen::Terraform::SystemAttrsInputsResolver
#initialize prepares a new instance of the class.
28 29 30 |
# File 'lib/kitchen/terraform/system_attrs_inputs_resolver.rb', line 28 def initialize(attrs:) self.attrs = attrs end |
Instance Method Details
#resolve(inputs:) ⇒ Object
#resolve stores the inputs as attributes.
36 37 38 39 40 41 42 |
# File 'lib/kitchen/terraform/system_attrs_inputs_resolver.rb', line 36 def resolve(inputs:) inputs.each_pair do |input_name, input_value| attrs.store "input_#{input_name}", input_value end self end |