Class: Datadog::CI::TestOptimisation::SkippablePercentage::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/ci/test_optimisation/skippable_percentage/base.rb

Direct Known Subclasses

Calculator, Estimator

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(verbose: false, spec_path: "spec") ⇒ Base

Returns a new instance of Base.



10
11
12
13
14
15
16
17
# File 'lib/datadog/ci/test_optimisation/skippable_percentage/base.rb', line 10

def initialize(verbose: false, spec_path: "spec")
  @verbose = verbose
  @spec_path = spec_path
  @failed = false

  log("Spec path: #{@spec_path}")
  error!("Spec path is not a directory: #{@spec_path}") if !File.directory?(@spec_path)
end

Instance Attribute Details

#failedObject (readonly)

Returns the value of attribute failed.



8
9
10
# File 'lib/datadog/ci/test_optimisation/skippable_percentage/base.rb', line 8

def failed
  @failed
end

Instance Method Details

#callObject



19
20
21
# File 'lib/datadog/ci/test_optimisation/skippable_percentage/base.rb', line 19

def call
  0.0
end