method

each_with_hack

rails latest stable - Class: RackLintPatch::AllowStringSubclass

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_with_hack()
public

No documentation available.

# File actionpack/lib/action_controller/rack_lint_patch.rb, line 11
    def each_with_hack
      @closed = false

      @body.each { |part|
        assert("Body yielded non-string value #{part.inspect}") {
          part.kind_of?(String)
        }
        yield part
      }

      if @body.respond_to?(:to_path)
        assert("The file identified by body.to_path does not exist") {
          ::File.exist? @body.to_path
        }
      end
    end