Scientist v0.1.0 Scientist.Experiment behaviour
Summary
Functions
Adds the given function to the experiment as an candidate
Adds the given function to the experiment as the control
Adds a function to the experiment that is used to clean observed values
Adds a function to the experiment that is used to compare observations
Adds an ignore function to the experiment. The experiment will ignore a mismatch whenever this function returns true
Creates an experiment with the given name and context, using Scientist.Default as a callback module when none is provided
Returns true if the two observations match, reporting an error to the callback module if an exception is caught
Runs the experiment, using Scientist.Default as a callback module if none is provided
Returns the value of the experiment’s run_if function, or true if one does not exist. Reports an error to the callback module if an exception is caught
Adds a function to the experiment that should only execute when the experiment is run
Adds a function to the experiment that is used to determine if it should run
Returns true if an experiment determines a mismatch should be ignored, based on its ignore functions
Returns true if the experiment should run, reporting an error to the callback module if an exception is caught
Macros
Executes the given block, calling thrown and raised with the given reason if the block throws or raises an exception
Functions
Adds the given function to the experiment as an candidate.
Raises Scientist.DuplicateError
if the experiment already has a candidate with name
.
Adds the given function to the experiment as the control.
Raises Scientist.DuplicateError
if the experiment already has a control.
Adds an ignore function to the experiment. The experiment will ignore a mismatch whenever this function returns true.
Creates an experiment with the given name and context, using Scientist.Default as a callback module when none is provided.
Returns true if the two observations match, reporting an error to the callback module if an exception is caught.
Runs the experiment, using Scientist.Default as a callback module if none is provided.
Raises Scientist.MissingControlError
if the experiment has no control.
Raises Scientist.MismatchError
if the experiment has mismatched observations and is
configured with raise_on_mismatched: true
.
Returns the value of the experiment’s run_if function, or true if one does not exist. Reports an error to the callback module if an exception is caught.
Adds a function to the experiment that should only execute when the experiment is run.
Adds a function to the experiment that is used to determine if it should run.
Returns true if an experiment determines a mismatch should be ignored, based on its ignore functions.