method
each
v3.0.9 -
Show latest stable
- Class:
ActionDispatch::Response
each(&callback)public
No documentation available.
# File actionpack/lib/action_dispatch/http/response.rb, line 149
def each(&callback)
if @body.respond_to?(:call)
@writer = lambda { |x| callback.call(x) }
@body.call(self, self)
else
@body.each { |part| callback.call(part.to_s) }
end
@writer = callback
@block.call(self) if @block
end