class Kitchen::Terraform::CommandFlag::PluginDir
PluginDir
is the class of objects which control the location of the directory which contains plugin binaries.
Attributes
pathname[RW]
Public Class Methods
new(pathname:)
click to toggle source
initialize prepares a new instance of the class.
@param pathname [String] the pathname of the directory. @return [Kitchen::Terraform::CommandFlag::PluginDir]
# File lib/kitchen/terraform/command_flag/plugin_dir.rb, line 28 def initialize(pathname:) self.pathname = pathname.to_s end
Public Instance Methods
to_s()
click to toggle source
@return [String] the plugin directory flag.
# File lib/kitchen/terraform/command_flag/plugin_dir.rb, line 33 def to_s if pathname.empty? "" else "-plugin-dir=\"#{::Shellwords.shelljoin ::Shellwords.shellsplit pathname}\"" end end