Class: ActionController::Middleware
- Inherits:
-
Metal
show all
- Defined in:
- lib/action_controller/middleware.rb
Defined Under Namespace
Classes: ActionMiddleware
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Metal
action, call, #content_type, #content_type=, controller_name, #controller_name, #dispatch, #env, inherited, #location, #location=, middleware, #params, #params=, #performed?, #response_body=, #status, #status=, #to_a, #url_for, use
abstract!, #action_methods, action_methods, #available_action?, clear_action_methods!, controller_path, #controller_path, hidden_actions, internal_methods, method_added
Constructor Details
30
31
32
33
|
# File 'lib/action_controller/middleware.rb', line 30
def initialize(app)
super()
@_app = app
end
|
Class Method Details
.build ⇒ Object
15
|
# File 'lib/action_controller/middleware.rb', line 15
alias build new
|
.new(app) ⇒ Object
17
18
19
|
# File 'lib/action_controller/middleware.rb', line 17
def new(app)
ActionMiddleware.new(self, app)
end
|
Instance Method Details
#index ⇒ Object
35
36
37
|
# File 'lib/action_controller/middleware.rb', line 35
def index
call(env)
end
|
#process(action) ⇒ Object
24
25
26
27
28
|
# File 'lib/action_controller/middleware.rb', line 24
def process(action)
response = super
self.status, self., self.response_body = response if response.is_a?(Array)
response
end
|