Class: Experimental::Source::Configuration

Inherits:
Base
  • Object
show all
Defined in:
lib/experimental/source/configuration.rb

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



4
5
6
7
8
9
10
# File 'lib/experimental/source/configuration.rb', line 4

def initialize
  @experiments = {}
  Experimental.experiment_data.each do |name, attributes|
    experiment = Experiment.new(attributes) { |e| e.name = name }
    @experiments[experiment.name] = experiment
  end
end

Instance Method Details

#[](name) ⇒ Object



12
13
14
# File 'lib/experimental/source/configuration.rb', line 12

def [](name)
  @experiments[name.to_s]
end

#availableObject



16
17
18
# File 'lib/experimental/source/configuration.rb', line 16

def available
  @experiments.values
end