Class: Rack::Bug::RackStaticBugAvoider
- Inherits:
-
Object
- Object
- Rack::Bug::RackStaticBugAvoider
- Defined in:
- lib/rack/bug/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/bug/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/bug/rack_static_bug_avoider.rb', line 8 def call(env) if env["PATH_INFO"] @static_app.call(env) else @app.call(env) end end |