method
each
rails latest stable - Class:
ActionController::Response
each(&callback)public
No documentation available.
# File actionpack/lib/action_controller/response.rb, line 147
def each(&callback)
if @body.respond_to?(:call)
@writer = lambda { |x| callback.call(x) }
@body.call(self, self)
elsif @body.respond_to?(:to_str)
yield @body
else
@body.each(&callback)
end
@writer = callback
@block.call(self) if @block
end