Method: Rack::Response#write

Defined in:
lib/rack/response.rb

#write(chunk) ⇒ Object

Append a chunk to the response body.

Converts the response into a buffered response if it wasn’t already.

NOTE: Do not mix #write and direct #body access!


146
147
148
149
150
# File 'lib/rack/response.rb', line 146

def write(chunk)
  buffered_body!

  @writer.call(chunk.to_s)
end