Class: Kitchen::Terraform::CommandFlag::Upgrade
- Inherits:
-
Object
- Object
- Kitchen::Terraform::CommandFlag::Upgrade
- Defined in:
- lib/kitchen/terraform/command_flag/upgrade.rb
Overview
Upgrade is the class of objects which control the upgrade of existing modules and plugins.
Instance Method Summary collapse
-
#initialize(enabled:) ⇒ Kitchen::Terraform::CommandFlag::Upgrade
constructor
#initialize prepares a new instance of the class.
-
#to_s ⇒ String
The upgrade flag.
Constructor Details
#initialize(enabled:) ⇒ Kitchen::Terraform::CommandFlag::Upgrade
#initialize prepares a new instance of the class.
26 27 28 |
# File 'lib/kitchen/terraform/command_flag/upgrade.rb', line 26 def initialize(enabled:) self.enabled = enabled end |
Instance Method Details
#to_s ⇒ String
Returns the upgrade flag.
31 32 33 34 35 36 37 |
# File 'lib/kitchen/terraform/command_flag/upgrade.rb', line 31 def to_s if enabled "-upgrade=true" else "" end end |