Class: Kitchen::Terraform::CommandFlag::VarFile
- Inherits:
-
Object
- Object
- Kitchen::Terraform::CommandFlag::VarFile
- Defined in:
- lib/kitchen/terraform/command_flag/var_file.rb
Overview
VarFile is the class of objects which control the locations of configuration variables files.
Instance Method Summary collapse
-
#initialize(pathnames:) ⇒ Kitchen::Terraform::CommandFlag::VarFile
constructor
#initialize prepares a new instance of the class.
-
#to_s ⇒ String
The backend configuration flag.
Constructor Details
#initialize(pathnames:) ⇒ Kitchen::Terraform::CommandFlag::VarFile
#initialize prepares a new instance of the class.
28 29 30 |
# File 'lib/kitchen/terraform/command_flag/var_file.rb', line 28 def initialize(pathnames:) self.pathnames = pathnames end |
Instance Method Details
#to_s ⇒ String
Returns the backend configuration flag.
33 34 35 36 37 |
# File 'lib/kitchen/terraform/command_flag/var_file.rb', line 33 def to_s pathnames.map do |path| "-var-file=\"#{::Shellwords.shelljoin ::Shellwords.shellsplit path}\"" end.join " " end |