Class: ABSplit::Test

Inherits:
Object
  • Object
show all
Includes:
ABSplit
Defined in:
lib/a_b_split/test.rb

Overview

This class is responsible for spliting the population using the experiment name passed as a parameter. It will always return an experiment name or a NoValidExperiment error in case is chosen any unknown experiment.

Constant Summary

Constants included from ABSplit

VERSION

Class Method Summary collapse

Methods included from ABSplit

configuration, configuration=, configure

Class Method Details

.split(name, x) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/a_b_split/test.rb', line 10

def split(name, x)
  self.experiment = find(name)

  raise ABSplit::NoValidExperiment unless experiment

  function.value_for(x, *options)
end