class Protocol::HTTP::Body::Buffered

def self.wrap(object)

@returns [Readable | nil] the wrapped body or nil if nil was given.
@parameter body [String | Array(String) | Readable | nil] the body to wrap.

For compatibility, also accepts anything that behaves like an `Array(String)`.

Tries to wrap an object in a {Buffered} instance.
def self.wrap(object)
	if object.is_a?(Readable)
		return object
	elsif object.is_a?(Array)
		return self.new(object)
	elsif object.is_a?(String)
		return self.new([object])
	elsif object
		return self.read(object)
	end
end