method

each

rails latest stable - Class: ActionController::Response

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

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