Module: Flip::Cacheable

Defined in:
lib/flip/cacheable.rb

Instance Method Summary collapse

Instance Method Details

#feature_cacheObject



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_cacheObject



12
13
14
15
# File 'lib/flip/cacheable.rb', line 12

def start_feature_cache
  @use_feature_cache = true
  @features = nil
end

#use_feature_cacheObject



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