class Webmachine::Streaming::EnumerableEncoder

Implements a streaming encoder for Enumerable response bodies, such as Arrays. @api private

Public Instance Methods

each() { |send(encoder, send)| ... } click to toggle source

Iterates over the body, encoding and yielding individual chunks of the response entity. @yield [chunk] @yieldparam [String] chunk a chunk of the response, encoded

# File lib/webmachine/streaming/enumerable_encoder.rb, line 13
def each
  body.each do |block|
    yield resource.send(encoder, resource.send(charsetter, block.to_s))
  end
end