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