Class: Kitchen::Terraform::Command::ValidateFactory
- Inherits:
-
Object
- Object
- Kitchen::Terraform::Command::ValidateFactory
- Defined in:
- lib/kitchen/terraform/command/validate_factory.rb
Overview
ValidateFactory is the class of objects which build Validate objects.
Instance Method Summary collapse
-
#build(config:) ⇒ Kitchen::Terraform::Command::Validate::PreZeroFifteenZero, Kitchen::Terraform::Command::Validate::PostZeroFifteenZero
#build creates a new instance of an Validate object.
-
#initialize(version:) ⇒ Kitchen::Terraform::Command::ValidateFactory
constructor
#initialize prepares a new instance of the class.
Constructor Details
#initialize(version:) ⇒ Kitchen::Terraform::Command::ValidateFactory
#initialize prepares a new instance of the class
43 44 45 46 |
# File 'lib/kitchen/terraform/command/validate_factory.rb', line 43 def initialize(version:) self.requirement = ::Gem::Requirement.new "< 0.15.0" self.version = version end |
Instance Method Details
#build(config:) ⇒ Kitchen::Terraform::Command::Validate::PreZeroFifteenZero, Kitchen::Terraform::Command::Validate::PostZeroFifteenZero
#build creates a new instance of an Validate object.
31 32 33 34 35 36 37 |
# File 'lib/kitchen/terraform/command/validate_factory.rb', line 31 def build(config:) if requirement.satisfied_by? version return ::Kitchen::Terraform::Command::Validate::PreZeroFifteenZero.new config: config end ::Kitchen::Terraform::Command::Validate::PostZeroFifteenZero.new config: config end |