Class: Kitchen::Terraform::VerifyVersionRescueStrategyFactory
- Inherits:
-
Object
- Object
- Kitchen::Terraform::VerifyVersionRescueStrategyFactory
- Defined in:
- lib/kitchen/terraform/verify_version_rescue_strategy_factory.rb
Overview
VerifyVersionRescueStrategyFactory is the class of objects which build rescue strategies for instances of VerifyVersion.
Instance Method Summary collapse
-
#build(logger:) ⇒ Kitchen::Terraform::VerifyVersionRescueStrategy::Strict, Kitchen::Terraform::VerifyVersionRescueStrategy::Permissive
#build creates a strategy.
-
#initialize(verify_version:) ⇒ Kitchen::Terraform::VerifyVersionRescueStrategyFactory
constructor
#initialize prepares a new instance of the class.
Constructor Details
#initialize(verify_version:) ⇒ Kitchen::Terraform::VerifyVersionRescueStrategyFactory
#initialize prepares a new instance of the class.
42 43 44 |
# File 'lib/kitchen/terraform/verify_version_rescue_strategy_factory.rb', line 42 def initialize(verify_version:) self.verify_version = verify_version end |
Instance Method Details
#build(logger:) ⇒ Kitchen::Terraform::VerifyVersionRescueStrategy::Strict, Kitchen::Terraform::VerifyVersionRescueStrategy::Permissive
#build creates a strategy.
30 31 32 33 34 35 36 |
# File 'lib/kitchen/terraform/verify_version_rescue_strategy_factory.rb', line 30 def build(logger:) if verify_version ::Kitchen::Terraform::VerifyVersionRescueStrategy::Strict.new else ::Kitchen::Terraform::VerifyVersionRescueStrategy::Permissive.new logger: logger end end |