class Kitchen::Terraform::CommandFlag::VarFile

VarFile is the class of objects which control the locations of configuration variables files.

Attributes

pathnames[RW]

Public Class Methods

new(pathnames:) click to toggle source

initialize prepares a new instance of the class.

@param pathnames [Array] the pathnames. @return [Kitchen::Terraform::CommandFlag::VarFile]

# File lib/kitchen/terraform/command_flag/var_file.rb, line 28
def initialize(pathnames:)
  self.pathnames = pathnames
end

Public Instance Methods

to_s() click to toggle source

@return [String] the backend configuration flag.

# 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