Class: Rack::Insight::RackStaticBugAvoider
- Inherits:
-
Object
- Object
- Rack::Insight::RackStaticBugAvoider
- Defined in:
- lib/rack/insight/rack_static_bug_avoider.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.
3 4 5 6 |
# File 'lib/rack/insight/rack_static_bug_avoider.rb', line 3 def initialize(app, static_app) @app = app @static_app = static_app end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/rack/insight/rack_static_bug_avoider.rb', line 8 def call(env) if env["PATH_INFO"] @static_app.call(env) else @app.call(env) end end |