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