Class: Kitchen::Terraform::VersionVerifier
- Inherits:
-
Object
- Object
- Kitchen::Terraform::VersionVerifier
- Defined in:
- lib/kitchen/terraform/version_verifier.rb
Overview
VersionVerifier is the class of objects which verify a Terraform client version against a requirement.
Instance Method Summary collapse
-
#initialize(version_requirement:) ⇒ Kitchen::Terraform::VersionVerifier
constructor
#initialize prepares a new instance of the class.
-
#verify(version:) ⇒ self
#verify verifies a version against the requirement.
Constructor Details
#initialize(version_requirement:) ⇒ Kitchen::Terraform::VersionVerifier
#initialize prepares a new instance of the class.
39 40 41 42 43 |
# File 'lib/kitchen/terraform/version_verifier.rb', line 39 def initialize(version_requirement:) self.version_verifier_strategy_factory = ::Kitchen::Terraform::VersionVerifierStrategyFactory.new( version_requirement: version_requirement, ) end |
Instance Method Details
#verify(version:) ⇒ self
#verify verifies a version against the requirement.
29 30 31 32 33 |
# File 'lib/kitchen/terraform/version_verifier.rb', line 29 def verify(version:) version_verifier_strategy_factory.build(version: version).call self end |