Sha256: abbb21c004f73e679bea7676a9f10a3d98f1a9f63181d0fae17ec47a96d93fbd
Contents?: true
Size: 737 Bytes
Versions: 4
Compression:
Stored size: 737 Bytes
Contents
module ActionController class Middleware < Metal class ActionMiddleware def initialize(controller, app) @controller, @app = controller, app end def call(env) request = ActionDispatch::Request.new(env) @controller.build(@app).dispatch(:index, request) end end class << self alias build new def new(app) ActionMiddleware.new(self, app) end end attr_internal :app def process(action) response = super self.status, self.headers, self.response_body = response if response.is_a?(Array) response end def initialize(app) super() @_app = app end def index call(env) end end end
Version data entries
4 entries across 4 versions & 1 rubygems