Module: Experimental::Population::Filter
- Included in:
- Experiment
- Defined in:
- lib/experimental/population/filter.rb
Class Method Summary collapse
Instance Method Summary collapse
- #find_population(name) ⇒ Object
- #register_population_filter(name, filter_class) ⇒ Object
- #reset_population_filters ⇒ Object
Class Method Details
.extended(base) ⇒ Object
4 5 6 |
# File 'lib/experimental/population/filter.rb', line 4 def self.extended(base) base.reset_population_filters end |
Instance Method Details
#find_population(name) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/experimental/population/filter.rb', line 8 def find_population(name) if name.blank? Experimental::Population::Default else filter_classes[name.to_s] end end |
#register_population_filter(name, filter_class) ⇒ Object
16 17 18 |
# File 'lib/experimental/population/filter.rb', line 16 def register_population_filter(name, filter_class) filter_classes[name.to_s] = filter_class end |