class Kitchen::Terraform::SystemsVerifierFactory

SystemsVerifierFactory is the class of objects which build SystemVerifiers.

Attributes

fail_fast[RW]

Public Class Methods

new(fail_fast:) click to toggle source

initialize prepares a new instance of the class.

@param fail_fast [Boolean] a toggle to fail fast or fail slow. @return [Kitchen::Terraform::SystemsVerifierFactory]

# File lib/kitchen/terraform/systems_verifier_factory.rb, line 41
def initialize(fail_fast:)
  self.fail_fast = fail_fast
end

Public Instance Methods

build(systems:) click to toggle source

build creates a SystemVerifier.

@param systems [Array<::Kitchen::Terraform::System>] the Systems to be verified. @return [Kitchen::Terraform::SystemsVerifier::FailFast, ::Kitchen::Terraform::SystemsVerifier::FailSlow] a

SystemsVerifier.
# 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