examples/memoizing.rb in flipper-0.21.0.rc1 vs examples/memoizing.rb in flipper-0.21.0.rc2
- old
+ new
@@ -2,15 +2,12 @@
require 'flipper'
require 'flipper/adapters/operation_logger'
require 'flipper/instrumentation/log_subscriber'
Flipper.configure do |config|
- config.default do
+ config.adapter do
# pick an adapter, this uses memory, any will do
- adapter = Flipper::Adapters::OperationLogger.new(Flipper::Adapters::Memory.new)
-
- # pass adapter to handy DSL instance
- Flipper.new(adapter)
+ Flipper::Adapters::OperationLogger.new(Flipper::Adapters::Memory.new)
end
end
Flipper.enable(:foo)
Flipper.enable(:bar)