Class: Rack::Bug::RackStaticBugAvoider
- Inherits:
-
Object
- Object
- Rack::Bug::RackStaticBugAvoider
- Defined in:
- lib/rack/bug/toolbar.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, static_app) ⇒ RackStaticBugAvoider
constructor
A new instance of RackStaticBugAvoider.
Constructor Details
#initialize(app, static_app) ⇒ RackStaticBugAvoider
Returns a new instance of RackStaticBugAvoider.
7 8 9 10 |
# File 'lib/rack/bug/toolbar.rb', line 7 def initialize(app, static_app) @app = app @static_app = static_app end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/rack/bug/toolbar.rb', line 12 def call(env) if env["PATH_INFO"] @static_app.call(env) else @app.call(env) end end |