Sha256: c09006f2d3ddf1aeaac9a834785663bf95ed175e49bfb29ad718292da5afaa64
Contents?: true
Size: 530 Bytes
Versions: 2
Compression:
Stored size: 530 Bytes
Contents
require 'pathname' require 'logger' root_path = Pathname(__FILE__).dirname.join('..').expand_path lib_path = root_path.join('lib') $:.unshift(lib_path) require 'flipper/adapters/mongo' collection = Mongo::MongoClient.new.db('testing')['flipper'] adapter = Flipper::Adapters::Mongo.new(collection) flipper = Flipper.new(adapter) flipper[:stats].enable if flipper[:stats].enabled? puts "Enabled!" else puts "Disabled!" end flipper[:stats].disable if flipper[:stats].enabled? puts "Enabled!" else puts "Disabled!" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
flipper-mongo-0.6.0 | examples/basic.rb |
flipper-mongo-0.5.0 | examples/basic.rb |