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

Version Path
flipper-0.20.4 examples/configuring_default.rb
flipper-0.20.3 examples/configuring_default.rb
flipper-0.20.2 examples/configuring_default.rb
flipper-0.20.1 examples/configuring_default.rb
flipper-0.20.0 examples/configuring_default.rb
flipper-0.20.0.beta3 examples/configuring_default.rb
flipper-0.20.0.beta2 examples/configuring_default.rb
flipper-0.20.0.beta1 examples/configuring_default.rb
flipper-0.19.1 examples/configuring_default.rb
flipper-0.19.0 examples/configuring_default.rb
flipper-0.18.0 examples/configuring_default.rb
flipper-0.17.2 examples/configuring_default.rb
flipper-0.17.1 examples/configuring_default.rb
flipper-0.16.2 examples/configuring_default.rb
flipper-0.16.1 examples/configuring_default.rb
flipper-0.16.0 examples/configuring_default.rb