Sha256: c76fca7876e3a597e3ee5107c8063d403a168ed5e8b74993ece173ee993fed02
Contents?: true
Size: 564 Bytes
Versions: 1
Compression:
Stored size: 564 Bytes
Contents
require 'bundler/setup' require 'flipper' # sets up default adapter so Flipper works like Flipper::DSL Flipper.configure do |config| config.default do Flipper.new Flipper::Adapters::Memory.new end end puts Flipper.enabled?(:search) # => false Flipper.enable(:search) puts Flipper.enabled?(:search) # => true Flipper.disable(:search) enabled_actor = Flipper::Actor.new("1") disabled_actor = Flipper::Actor.new("2") Flipper.enable_actor(:search, enabled_actor) puts Flipper.enabled?(:search, enabled_actor) puts Flipper.enabled?(:search, disabled_actor)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
flipper-0.21.0.rc1 | examples/configuring_default.rb |