class ActionDispatch::Response::FileBody

:nodoc:
reason to open the file.
will usually intercept the response and uses the path directly, so there is no
Avoid having to pass an open file handle as the response body. Rack::Sendfile

def body

def body
  File.binread(to_path)
end

def each

Stream the file's contents if Rack::Sendfile isn't present.
def each
  File.open(to_path, "rb") do |file|
    while chunk = file.read(16384)
      yield chunk
    end
  end
end

def initialize(path)

def initialize(path)
  @to_path = path
end