Class: Kitchen::Terraform::CommandFlag::PluginDir
- Inherits:
-
Object
- Object
- Kitchen::Terraform::CommandFlag::PluginDir
- Defined in:
- lib/kitchen/terraform/command_flag/plugin_dir.rb
Overview
PluginDir is the class of objects which control the location of the directory which contains plugin binaries.
Instance Method Summary collapse
-
#initialize(pathname:) ⇒ Kitchen::Terraform::CommandFlag::PluginDir
constructor
#initialize prepares a new instance of the class.
-
#to_s ⇒ String
The plugin directory flag.
Constructor Details
#initialize(pathname:) ⇒ Kitchen::Terraform::CommandFlag::PluginDir
#initialize prepares a new instance of the class.
28 29 30 |
# File 'lib/kitchen/terraform/command_flag/plugin_dir.rb', line 28 def initialize(pathname:) self.pathname = pathname.to_s end |
Instance Method Details
#to_s ⇒ String
Returns the plugin directory flag.
33 34 35 36 37 38 39 |
# 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 |