module Roda::RodaPlugins::RunHandler::RequestMethods
Public Instance Methods
Source
# File lib/roda/plugins/run_handler.rb, line 35 def run(app, opts=OPTS) res = catch(:halt){super(app)} yield res if defined?(yield) if opts[:not_found] == :pass && res[0] == 404 body = res[2] body.close if body.respond_to?(:close) nil else throw(:halt, res) end end
If a block is given, yield the rack response array to it. The response can be modified before it is returned by the current app.
If the not_found: :pass
option is given, and the rack response returned by the app is a 404 response, do not return the response, continue routing normally.
Calls superclass method