Module: Absurdity
- Defined in:
- lib/absurdity.rb,
lib/absurdity/config.rb,
lib/absurdity/engine.rb,
lib/absurdity/metric.rb,
lib/absurdity/railtie.rb,
lib/absurdity/variant.rb,
lib/absurdity/version.rb,
lib/absurdity/datastore.rb,
lib/absurdity/experiment.rb,
lib/absurdity/datastore/redis.rb
Defined Under Namespace
Classes: Config, Datastore, Engine, Experiment, Metric, MissingIdentityIDError, Railtie, Redis, Variant
Constant Summary
collapse
- VERSION =
"0.2.8"
Class Method Summary
collapse
Class Method Details
.redis=(redis) ⇒ Object
14
15
16
|
# File 'lib/absurdity.rb', line 14
def self.redis=(redis)
Config.instance.redis = redis
end
|
.track!(metric_slug, experiment_slug, identity_id = nil) ⇒ Object
18
19
20
|
# File 'lib/absurdity.rb', line 18
def self.track!(metric_slug, experiment_slug, identity_id=nil)
Experiment.find(experiment_slug).track!(metric_slug, identity_id)
end
|
.variant(experiment_slug, identity_id) ⇒ Object
22
23
24
|
# File 'lib/absurdity.rb', line 22
def self.variant(experiment_slug, identity_id)
Experiment.find(experiment_slug).variant_for(identity_id)
end
|