Class: Kitchen::Terraform::SystemsVerifierFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/terraform/systems_verifier_factory.rb

Overview

SystemsVerifierFactory is the class of objects which build SystemVerifiers.

Instance Method Summary collapse

Constructor Details

#initialize(fail_fast:) ⇒ Kitchen::Terraform::SystemsVerifierFactory

#initialize prepares a new instance of the class.

Parameters:

  • fail_fast (Boolean)

    a toggle to fail fast or fail slow.



41
42
43
# File 'lib/kitchen/terraform/systems_verifier_factory.rb', line 41

def initialize(fail_fast:)
  self.fail_fast = fail_fast
end

Instance Method Details

#build(systems:) ⇒ Kitchen::Terraform::SystemsVerifier::FailFast, ::Kitchen::Terraform::SystemsVerifier::FailSlow

#build creates a SystemVerifier.

Parameters:

Returns:



29
30
31
32
33
34
35
# File 'lib/kitchen/terraform/systems_verifier_factory.rb', line 29

def build(systems:)
  if fail_fast
    ::Kitchen::Terraform::SystemsVerifier::FailFast.new systems: systems
  else
    ::Kitchen::Terraform::SystemsVerifier::FailSlow.new systems: systems
  end
end