Module: Rack::Conditionable

Included in:
Builder, Rails::Configuration::MiddlewareStackProxy, Sinatra::Base
Defined in:
lib/rack/conditionable.rb

Overview

Add “use_if” method by include.

Instance Method Summary collapse

Instance Method Details

#use_if(condition, middleware, *args, &block) ⇒ Object



6
7
8
# File 'lib/rack/conditionable.rb', line 6

def use_if(condition, middleware, *args, &block)
  use Rack::Conditional, condition, middleware, *args, &block
end