lib/split/experiment.rb in split-1.0.0 vs lib/split/experiment.rb in split-1.1.0
- old
+ new
@@ -1,16 +1,16 @@
- module Split
+module Split
class Experiment
attr_accessor :name
attr_writer :algorithm
attr_accessor :resettable
attr_accessor :goals
attr_accessor :alternatives
attr_accessor :alternative_probabilities
DEFAULT_OPTIONS = {
- :resettable => true,
+ :resettable => true
}
def initialize(name, options = {})
options = DEFAULT_OPTIONS.merge(options)
@@ -67,26 +67,9 @@
self.resettable = options[:resettable]
# calculate probability that each alternative is the winner
@alternative_probabilities = {}
alts
- end
-
- def self.all
- ExperimentCatalog.all
- end
-
- # Return experiments without a winner (considered "active") first
- def self.all_active_first
- ExperimentCatalog.all_active_first
- end
-
- def self.find(name)
- ExperimentCatalog.find(name)
- end
-
- def self.find_or_create(label, *alternatives)
- ExperimentCatalog.find_or_create(label, *alternatives)
end
def save
validate!