Class/Module Index [+]

Quicksearch

RackLintPatch::AllowStringSubclass

Public Class Methods

included(base) click to toggle source
# File lib/action_controller/rack_lint_patch.rb, line 7
def self.included(base)
  base.send :alias_method, :each, :each_with_hack
end

Public Instance Methods

each_with_hack() click to toggle source
# File 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.