Module: EasyAb

Defined in:
lib/easy_ab.rb,
lib/easy_ab/engine.rb,
lib/easy_ab/helpers.rb,
lib/easy_ab/version.rb,
lib/easy_ab/experiment.rb,
lib/easy_ab/participant.rb,
app/models/easy_ab/grouping.rb,
lib/easy_ab/rspec/spec_helper.rb,
lib/generators/easy_ab/install_generator.rb

Defined Under Namespace

Modules: Generators, Helpers, RSpec Classes: Config, Engine, Error, Experiment, ExperimentNotFound, Experiments, Grouping, Participant

Constant Summary collapse

VERSION =
'0.8.1'

Class Method Summary collapse

Class Method Details

.configObject



11
12
13
# File 'lib/easy_ab.rb', line 11

def config
  @@config
end

.configure {|@@config| ... } ⇒ Object

Yields:



15
16
17
18
# File 'lib/easy_ab.rb', line 15

def configure
  @@config ||= Config.new
  yield(@@config)
end

.experimentsObject



20
21
22
23
24
25
26
27
28
# File 'lib/easy_ab.rb', line 20

def experiments
  @@experiments ||= Experiments.new

  if block_given?
    yield(@@experiments)
  else
    @@experiments
  end
end