instance method each

Ruby on Rails 2.3.18

Since v2.3.18 Last seen in v2.3.18

Signature

each(&callback)

No documentation comment.

Parameters

callback block
Source
# File actionpack/lib/action_controller/response.rb, line 148
    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

Defined in actionpack/lib/action_controller/response.rb line 148 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::Response

Type at least 2 characters to search.

↑↓ navigate · open · esc close