Sha256: 214bdfcb15a71ebaa6b8692abe88670986407352a129334ea4bfd420fc79b402

Contents?: true

Size: 487 Bytes

Versions: 31

Compression:

Stored size: 487 Bytes

Contents

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

require 'flipper'
require 'flipper/adapters/memory'

# pick an adapter
adapter = Flipper::Adapters::Memory.new

# get a handy dsl instance
flipper = Flipper.new(adapter)

# grab a feature
search = flipper[:search]

perform = lambda do
  # check if that feature is enabled
  if search.enabled?
    puts 'Search away!'
  else
    puts 'No search for you!'
  end
end

perform.call
puts 'Enabling Search...'
search.enable
perform.call

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
flipper-0.11.0.beta6 examples/basic.rb
flipper-0.11.0.beta5 examples/basic.rb
flipper-0.11.0.beta4 examples/basic.rb
flipper-0.11.0.beta3 examples/basic.rb
flipper-0.11.0.beta1 examples/basic.rb
flipper-0.10.2 examples/basic.rb
flipper-0.10.1 examples/basic.rb
flipper-0.10.0 examples/basic.rb
flipper-0.9.2 examples/basic.rb
flipper-0.9.1 examples/basic.rb
flipper-0.9.0 examples/basic.rb
flipper-0.9.0.beta1 examples/basic.rb
flipper-0.8.0 examples/basic.rb
flipper-0.7.5 examples/basic.rb
flipper-0.7.4 examples/basic.rb
flipper-0.7.3 examples/basic.rb
flipper-0.7.2 examples/basic.rb
flipper-0.7.1 examples/basic.rb
flipper-0.7.0 examples/basic.rb
flipper-0.7.0.beta6 examples/basic.rb