Class: Insight::RackStaticBugAvoider
- Inherits:
-
Object
- Object
- Insight::RackStaticBugAvoider
- Defined in:
- lib/insight/rack_static_bug_avoider.rb
Instance Method Summary (collapse)
- - (Object) call(env)
-
- (RackStaticBugAvoider) initialize(app, static_app)
constructor
A new instance of RackStaticBugAvoider.
Constructor Details
- (RackStaticBugAvoider) initialize(app, static_app)
A new instance of RackStaticBugAvoider
3 4 5 6 |
# File 'lib/insight/rack_static_bug_avoider.rb', line 3 def initialize(app, static_app) @app = app @static_app = static_app end |
Instance Method Details
- (Object) call(env)
8 9 10 11 12 13 14 |
# File 'lib/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 |