Sha256: 3358ad112b73835641021a8fdce058d832ba2d555f088bedba18dde274bdfeba
Contents?: true
Size: 596 Bytes
Versions: 16
Compression:
Stored size: 596 Bytes
Contents
require File.expand_path('../example_setup', __FILE__) 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
16 entries across 16 versions & 1 rubygems