Class: Experimental::Source::Configuration
- Defined in:
- lib/experimental/source/configuration.rb
Instance Method Summary collapse
- #[](name) ⇒ Object
- #available ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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 |
#available ⇒ Object
16 17 18 |
# File 'lib/experimental/source/configuration.rb', line 16 def available @experiments.values end |