Module: Experimental
- Defined in:
- lib/experimental/population/default.rb,
lib/experimental.rb,
lib/experimental/test.rb,
lib/experimental/engine.rb,
lib/experimental/loader.rb,
lib/experimental/source.rb,
lib/experimental/railtie.rb,
lib/experimental/subject.rb,
lib/experimental/version.rb,
lib/experimental/overrides.rb,
lib/experimental/test/unit.rb,
lib/experimental/experiment.rb,
lib/experimental/population.rb,
lib/experimental/test/rspec.rb,
lib/experimental/source/base.rb,
lib/experimental/source/cache.rb,
lib/experimental/rspec_helpers.rb,
lib/experimental/population/filter.rb,
lib/experimental/population/new_users.rb,
lib/experimental/source/active_record.rb,
lib/experimental/source/configuration.rb
Overview
This class will filter the population of an experiment Override in? to filter the population Called by Experiment.in?
Defined Under Namespace
Modules: ClassMethods, Population, RspecHelpers, Source, Subject, Test
Classes: Engine, Experiment, Loader, Overrides, Railtie
Constant Summary
collapse
- VERSION =
[0, 6, 0]
Class Method Summary
collapse
Class Method Details
15
16
17
18
19
20
21
22
|
# File 'lib/experimental.rb', line 15
def configure(configuration)
source = Source::ActiveRecord.new
if (ttl = configuration['cache_for'])
source = Source::Cache.new(source, ttl: ttl)
end
self.experiment_data = configuration['experiments']
self.source = source
end
|
.experiment_data ⇒ Object
40
41
42
|
# File 'lib/experimental.rb', line 40
def experiment_data
@experimental_data ||= {}
end
|
.experiment_data=(data) ⇒ Object
36
37
38
|
# File 'lib/experimental.rb', line 36
def experiment_data=(data)
@experimental_data = data
end
|
.overrides ⇒ Object
51
52
53
|
# File 'lib/experimental.rb', line 51
def self.overrides
Thread.current[:experimental_overrides] ||= Overrides.new
end
|
.register_population_filter(name, filter_class) ⇒ Object
.source ⇒ Object
32
33
34
|
# File 'lib/experimental.rb', line 32
def source
@experimental_source ||= Source::ActiveRecord.new
end
|
.source=(source) ⇒ Object
28
29
30
|
# File 'lib/experimental.rb', line 28
def source=(source)
@experimental_source = source
end
|