Class: Rack::Reshow::RackStaticBugAvoider

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/reshow.rb

Instance Method Summary collapse

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