instance method
swap
Ruby on Rails 3.2.22.5
Since v3.0.20Signature
swap(target, *args, &block)
No documentation comment.
Parameters
-
targetreq -
argsrest -
blockblock
Source
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 95
def swap(target, *args, &block)
index = assert_index(target, :before)
insert(index, *args, &block)
middlewares.delete_at(index + 1)
end
Defined in actionpack/lib/action_dispatch/middleware/stack.rb line 95
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::MiddlewareStack