Class: Rox::Core::ExperimentRepository

Inherits:
Object
  • Object
show all
Defined in:
lib/rox/core/repositories/experiment_repository.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeExperimentRepository

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

Parameters:

  • value

    the value to set the attribute experiments to.



8
9
10
# File 'lib/rox/core/repositories/experiment_repository.rb', line 8

def experiments=(value)
  @experiments = value
end

Instance Method Details

#all_experimentsObject



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