Skip to content
Browse files

Update readme to new dsl and add types

  • Loading branch information...
1 parent 502e824 commit c0d59b60339e90ccb43ac8e00d5583eec57ab4f1 @jnunemaker committed Aug 2, 2012
Showing with 29 additions and 11 deletions.
  1. +29 −11
@@ -5,27 +5,45 @@ Feature flipper for any adapter.
## Usage
+require 'flipper'
require 'flipper/adapters/memory'
+# pick an adapter
adapter =
-search =, adapter)
-if search.enabled?
- puts 'Search away!'
- puts 'No search for you!'
+# get a handy dsl instance
+flipper =
+# 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
puts 'Enabling Search...'
-if search.enabled?
- puts 'Search away!'
- puts 'No search for you!'
+Of course there are more [examples for you to peruse](
+## Types
+Out of the box several types of enabling are supported:
+* Boolean - All on or all off.
+* Group - Turn on feature based on value of block. Super flexible way to turn on a feature for multiple things (users, people, accounts, etc.)
+* Individual Actor - Turn on for individual thing. Think enable feature for someone to test or for a buddy.
+* Percentage of Actors - Turn this on for a percentage of actors (think users or people). Consistently on or off for this user as long as percentage increases. Think slow rollout of a new feature to users.
+* Percentage of Random - Turn this on for a random percentage of time
## Installation
Add this line to your application's Gemfile:

0 comments on commit c0d59b6

Please sign in to comment.
Something went wrong with that request. Please try again.