method
each
v2.2.1 -
Show latest stable
- Class:
ActionController::RackResponse
each(&callback)public
No documentation available.
# File actionpack/lib/action_controller/rack_process.rb, line 185
def each(&callback)
if @body.respond_to?(:call)
@writer = lambda { |x| callback.call(x) }
@body.call(self, self)
elsif @body.is_a?(String)
@body.each_line(&callback)
else
@body.each(&callback)
end
@writer = callback
@block.call(self) if @block
end