Class: Rox::Core::ExperimentRepository
- Inherits:
-
Object
- Object
- Rox::Core::ExperimentRepository
- Defined in:
- lib/rox/core/repositories/experiment_repository.rb
Instance Attribute Summary collapse
-
#experiments ⇒ Object
writeonly
Sets the attribute experiments.
Instance Method Summary collapse
- #all_experiments ⇒ Object
- #experiment_by_flag(flag_name) ⇒ Object
-
#initialize ⇒ ExperimentRepository
constructor
A new instance of ExperimentRepository.
Constructor Details
#initialize ⇒ ExperimentRepository
Returns a new instance of ExperimentRepository.
4 5 6 |
# File 'lib/rox/core/repositories/experiment_repository.rb', line 4 def initialize @experiments = [] end |
Instance Attribute Details
#experiments=(value) ⇒ Object (writeonly)
Sets the attribute experiments
8 9 10 |
# File 'lib/rox/core/repositories/experiment_repository.rb', line 8 def experiments=(value) @experiments = value end |
Instance Method Details
#all_experiments ⇒ Object
14 15 16 |
# File 'lib/rox/core/repositories/experiment_repository.rb', line 14 def all_experiments @experiments end |
#experiment_by_flag(flag_name) ⇒ Object
10 11 12 |
# File 'lib/rox/core/repositories/experiment_repository.rb', line 10 def experiment_by_flag(flag_name) @experiments.detect { |e| e.flags.include?(flag_name) } end |