Module: FeatureGuard
- Defined in:
- lib/feature_guard.rb,
lib/feature_guard/guard.rb,
lib/feature_guard/version.rb
Defined Under Namespace
Classes: Guard
Constant Summary collapse
- VERSION =
"0.2.1"
Class Attribute Summary collapse
Class Method Summary collapse
Class Attribute Details
.redis ⇒ Object
26 27 28 |
# File 'lib/feature_guard.rb', line 26 def redis @redis ||= Redis.new end |
Class Method Details
.all_flags ⇒ Object
10 11 12 |
# File 'lib/feature_guard.rb', line 10 def all_flags redis.hgetall(flags_hkey).keys.inject({}) { |h, f| h[f] = enabled? f; h } end |
.all_ramps ⇒ Object
14 15 16 |
# File 'lib/feature_guard.rb', line 14 def all_ramps redis.hgetall(ramps_hkey).keys.inject({}) { |h, f| h[f] = ramp_val f; h } end |
.flags_hkey ⇒ Object
18 19 20 |
# File 'lib/feature_guard.rb', line 18 def flags_hkey "featureguard_flags" end |
.ramps_hkey ⇒ Object
22 23 24 |
# File 'lib/feature_guard.rb', line 22 def ramps_hkey "featureguard_ramps" end |