class Flipflop::Strategies::TestStrategy

Public Class Methods

new(**options) click to toggle source
# File lib/flipflop/strategies/test_strategy.rb, line 6
def initialize(**options)
  @features = {}
  super(**options)
end

Public Instance Methods

clear!(feature) click to toggle source
# File lib/flipflop/strategies/test_strategy.rb, line 27
def clear!(feature)
  @@lock.synchronize do
    @features.delete(feature)
  end
end
enabled?(feature) click to toggle source
# File lib/flipflop/strategies/test_strategy.rb, line 15
def enabled?(feature)
  @@lock.synchronize do
    @features[feature]
  end
end
reset!() click to toggle source
# File lib/flipflop/strategies/test_strategy.rb, line 33
def reset!
  @@lock.synchronize do
    @features.clear
  end
end
switch!(feature, enabled) click to toggle source
# File lib/flipflop/strategies/test_strategy.rb, line 21
def switch!(feature, enabled)
  @@lock.synchronize do
    @features[feature] = enabled
  end
end
switchable?() click to toggle source
# File lib/flipflop/strategies/test_strategy.rb, line 11
def switchable?
  true
end