Class: Kitchen::Terraform::CommandFlag::Var
- Inherits:
-
Object
- Object
- Kitchen::Terraform::CommandFlag::Var
- Defined in:
- lib/kitchen/terraform/command_flag/var.rb
Overview
Var is the class of objects which control the configuration variables.
Instance Method Summary collapse
-
#initialize(arguments:) ⇒ Kitchen::Terraform::CommandFlag::Var
constructor
#initialize prepares a new instance of the class.
-
#to_s ⇒ String
The backend configuration flag.
Constructor Details
#initialize(arguments:) ⇒ Kitchen::Terraform::CommandFlag::Var
#initialize prepares a new instance of the class.
26 27 28 |
# File 'lib/kitchen/terraform/command_flag/var.rb', line 26 def initialize(arguments:) self.arguments = arguments end |
Instance Method Details
#to_s ⇒ String
Returns the backend configuration flag.
31 32 33 34 35 |
# File 'lib/kitchen/terraform/command_flag/var.rb', line 31 def to_s arguments.map do |key, value| "-var=\"#{key}=#{value}\"" end.join " " end |