class Roda::RodaPlugins::Chunked::StreamBody
Rack response body instance for chunked responses not using Transfer-Encoding: chunked.
Public Class Methods
Source
# File lib/roda/plugins/chunked.rb, line 196 def initialize(scope) @scope = scope end
Save the scope of the current request handling.
Public Instance Methods
Source
# File lib/roda/plugins/chunked.rb, line 201 def each(&block) @scope.each_chunk do |chunk| yield chunk if chunk && !chunk.empty? end end
Yield each non-empty chunk as the body.