class Wrapper
Wrapping body instance. Typically you'd override #read
.
Definitions
def self.wrap(message)
Wrap the body of the given message in a new instance of this class.
Signature
-
parameter
message
Request | Response
the message to wrap.
-
returns
Wrapper | nil
the wrapped body or nil if the body was nil.
Implementation
def self.wrap(message)
if body = message.body
message.body = self.new(body)
end
end
attr :body
The wrapped body.
def read
Read the next available chunk.
Implementation
def read
@body.read
end