Module: Wildsight::Rack

Defined in:
lib/wildsight/rack/rack.rb,
lib/wildsight/rack/top_middleware.rb,
lib/wildsight/rack/bottom_middleware.rb

Defined Under Namespace

Classes: BottomMiddleware, TopMiddleware

Constant Summary collapse

RACK_ENV_KEY =
'wildsight.context'

Class Method Summary collapse

Class Method Details

.detect_context(env) ⇒ Object



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

def self.detect_context(env)
  env[Wildsight::Rack::RACK_ENV_KEY] || Wildsight::Context.detect
end