Class: GitHubRunnerMatrix

Inherits:
Object show all
Defined in:
github_runner_matrix.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(testing_formulae, deleted_formulae, dependent_matrix:) ⇒ void

Parameters:



45
46
47
48
49
50
51
52
53
54
# File 'github_runner_matrix.rb', line 45

def initialize(testing_formulae, deleted_formulae, dependent_matrix:)
  @testing_formulae = T.let(testing_formulae, T::Array[TestRunnerFormula])
  @deleted_formulae = T.let(deleted_formulae, MaybeStringArray)
  @dependent_matrix = T.let(dependent_matrix, T::Boolean)

  @runners = T.let([], T::Array[GitHubRunner])
  generate_runners!

  freeze
end

Instance Attribute Details

#runnersObject (readonly)

Returns the value of attribute runners.



36
37
38
# File 'github_runner_matrix.rb', line 36

def runners
  @runners
end

Instance Method Details

#active_runner_specs_hashArray<RunnerSpecHash>

Returns:

  • (Array<RunnerSpecHash>)


57
58
59
60
61
# File 'github_runner_matrix.rb', line 57

def active_runner_specs_hash
  runners.select(&:active)
         .map(&:spec)
         .map(&:to_h)
end