module CanaryLabs

Constants

VERSION

Public Class Methods

add(name, desc, resolver) click to toggle source
# File lib/canary_labs.rb, line 22
def self.add name, desc, resolver
  @@experiments[name] = Feature.new name, desc, resolver
end
all() click to toggle source
# File lib/canary_labs.rb, line 30
def self.all
  @@experiments.values
end
find(name) click to toggle source
# File lib/canary_labs.rb, line 26
def self.find name
  @@experiments[name]
end
participating?(feat_name, id) click to toggle source
# File lib/canary_labs.rb, line 14
def self.participating? feat_name, id
  experiment = @@experiments[feat_name]

  return @@default_participation if experiment.nil?

  experiment.participating? id
end
setup(default_participation: true) click to toggle source
# File lib/canary_labs.rb, line 9
def self.setup default_participation: true
  @@experiments = {}
  @@default_participation = default_participation
end