Module: Flip::Cacheable
- Defined in:
- lib/flip/cacheable.rb
Instance Method Summary collapse
- #feature_cache ⇒ Object
- #start_feature_cache ⇒ Object
- #use_feature_cache ⇒ Object
- #use_feature_cache=(value) ⇒ Object
Instance Method Details
#feature_cache ⇒ Object
17 18 19 20 21 22 |
# File 'lib/flip/cacheable.rb', line 17 def feature_cache return @features if @features @features = {} all.each { |f| @features[f.key] = f } @features end |
#start_feature_cache ⇒ Object
12 13 14 15 |
# File 'lib/flip/cacheable.rb', line 12 def start_feature_cache @use_feature_cache = true @features = nil end |
#use_feature_cache ⇒ Object
8 9 10 |
# File 'lib/flip/cacheable.rb', line 8 def use_feature_cache @use_feature_cache end |
#use_feature_cache=(value) ⇒ Object
4 5 6 |
# File 'lib/flip/cacheable.rb', line 4 def use_feature_cache=(value) @use_feature_cache = value end |