Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Doc using the middleware.

  • Loading branch information...
commit 10da5002a24d8d8147d42160ccea667907e27afb 1 parent f12eaee
@jnunemaker authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 lib/flipper/ui/middleware.rb
View
16 lib/flipper/ui/middleware.rb
@@ -9,6 +9,22 @@
module Flipper
module UI
class Middleware
+ # Public: Initializes an instance of the UI middleware.
+ #
+ # app - The app this middleware is included in.
+ # flipper_or_block - The Flipper::DSL instance or a block that yields a
+ # Flipper::DSL instance to use for all operations.
+ #
+ # Examples
+ #
+ # flipper = Flipper.new(...)
+ #
+ # # using with a normal flipper instance
+ # use Flipper::UI::Middleware, flipper
+ #
+ # # using with a block that yields a flipper instance
+ # use Flipper::UI::Middleware, lambda { Flipper.new(...) }
+ #
def initialize(app, flipper_or_block)
@app = app
Please sign in to comment.
Something went wrong with that request. Please try again.