Class: Rack::Reshow::RackStaticBugAvoider
- Inherits:
-
Object
- Object
- Rack::Reshow::RackStaticBugAvoider
- Defined in:
- lib/rack/reshow.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.
90 91 92 93 |
# File 'lib/rack/reshow.rb', line 90 def initialize(app, static_app) @app = app @static_app = static_app end |
Instance Method Details
#call(env) ⇒ Object
95 96 97 98 99 100 101 |
# File 'lib/rack/reshow.rb', line 95 def call(env) if env["PATH_INFO"] @static_app.call(env) else @app.call(env) end end |