Sha256: 9b23811336c883aeb2421d916cd2caab3003e8e88c98c376ac63d2d2fd00abd3

Contents?: true

Size: 586 Bytes

Versions: 16

Compression:

Stored size: 586 Bytes

Contents

require File.expand_path('../example_setup', __FILE__)

require 'flipper'

Flipper.configure do |config|
  config.default do
    # pick an adapter, this uses memory, any will do
    adapter = Flipper::Adapters::Memory.new

    # pass adapter to handy DSL instance
    Flipper.new(adapter)
  end
end

# check if search is enabled
if Flipper.enabled?(:search)
  puts 'Search away!'
else
  puts 'No search for you!'
end

puts 'Enabling Search...'
Flipper.enable(:search)

# check if search is enabled
if Flipper.enabled?(:search)
  puts 'Search away!'
else
  puts 'No search for you!'
end

Version data entries

16 entries across 16 versions & 1 rubygems

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