class TrailGuide::Algorithms::Algorithm
Attributes
experiment[R]
Public Class Methods
choose!(experiment, **opts)
click to toggle source
# File lib/trail_guide/algorithms/algorithm.rb, line 6 def self.choose!(experiment, **opts) new(experiment).choose!(**opts) end
new(experiment)
click to toggle source
# File lib/trail_guide/algorithms/algorithm.rb, line 10 def initialize(experiment) @experiment = experiment end
Public Instance Methods
choose!(**opts)
click to toggle source
# File lib/trail_guide/algorithms/algorithm.rb, line 14 def choose!(**opts) raise NotImplementedError, 'You must define a `#choose!(**opts)` method for your algorithm' end
Protected Instance Methods
control()
click to toggle source
# File lib/trail_guide/algorithms/algorithm.rb, line 20 def control experiment.control end
variants()
click to toggle source
# File lib/trail_guide/algorithms/algorithm.rb, line 24 def variants experiment.variants end