Module: Scientist::Experiment::RaiseOnMismatch

Defined in:
lib/scientist/experiment.rb

Instance Method Summary collapse

Instance Method Details

#raise_on_mismatches=(bool) ⇒ Object

Set this flag to raise on experiment mismatches.

This causes all science mismatches to raise a MismatchError. This is intended for test environments and should not be enabled in a production environment.

bool - true/false - whether to raise when the control and candidate mismatch.



60
61
62
# File 'lib/scientist/experiment.rb', line 60

def raise_on_mismatches=(bool)
  @raise_on_mismatches = bool
end

#raise_on_mismatches?Boolean

Whether or not to raise a mismatch error when a mismatch occurs.

Returns:

  • (Boolean)


65
66
67
# File 'lib/scientist/experiment.rb', line 65

def raise_on_mismatches?
  @raise_on_mismatches
end