Protocol::HTTP SourceProtocolHTTPBodyBuffered

class Buffered

A body which buffers all it's contents.

Definitions

def self.wrap(body)

Wraps an array into a buffered body.

Implementation

def self.wrap(body)
	if body.is_a?(Readable)
		return body
	elsif body.is_a?(Array)
		return self.new(body)
	elsif body.is_a?(String)
		return self.new([body])
	elsif body
		return self.for(body)
	end
end

def ready?

A buffered response is always ready.

Implementation

def ready?
	true
end