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, value) ⇒ Object



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

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

  raise ABSplit::NoValidExperiment unless experiment

  function.value_for(value, *options)
end