Method: ActionDispatch::Routing::RouteWrapper#rack_app

Defined in:
actionpack/lib/action_dispatch/routing/inspector.rb

#rack_app(app = self.app) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'actionpack/lib/action_dispatch/routing/inspector.rb', line 15

def rack_app(app = self.app)
  @rack_app ||= begin
    class_name = app.class.name.to_s
    if class_name == "ActionDispatch::Routing::Mapper::Constraints"
      rack_app(app.app)
    elsif ActionDispatch::Routing::Redirect === app || class_name !~ /^ActionDispatch::Routing/
      app
    end
  end
end