Method: Merb::ControllerMixin#send_chunk
- Defined in:
- lib/merb-core/controller/mixins/controller.rb
#send_chunk(data) ⇒ Object
Writes a chunk from render_chunked to the response that is sent back to the client. This should only be called within a render_chunked block.
Parameters
- data<String>
-
a chunk of data to return.
64 65 66 67 |
# File 'lib/merb-core/controller/mixins/controller.rb', line 64 def send_chunk(data) @response.write('%x' % data.size + "\r\n") @response.write(data + "\r\n") end |