Class: ABSplit::Functions::WeightedSplit
- Inherits:
-
Object
- Object
- ABSplit::Functions::WeightedSplit
- Defined in:
- lib/a_b_split/functions/weighted_split.rb
Direct Known Subclasses
Constant Summary collapse
- MAX_POSITIONS =
capacity of Fixnum
(9999999999999999999 * 2) + 1
Class Method Summary collapse
Class Method Details
.value_for(x, *params) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/a_b_split/functions/weighted_split.rb', line 8 def value_for(x, *params) given_weights = validate(params) experiments = split_weights(params, params.size, given_weights) select_experiment_for(x, experiments) end |