We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e2e6ea commit f16adc3Copy full SHA for f16adc3
lib/protocol/grpc/body/readable_body.rb
@@ -15,6 +15,11 @@ module Body
15
# This is the standard readable body for gRPC - all gRPC responses use message framing.
16
# Wraps the underlying HTTP body and transforms raw chunks into decoded gRPC messages.
17
class ReadableBody < Protocol::HTTP::Body::Wrapper
18
+ # Wrap the body of a message.
19
+ #
20
+ # @parameter message [Request | Response] The message to wrap.
21
+ # @parameter options [Hash] The options to pass to the initializer.
22
+ # @returns [ReadableBody | Nil] The wrapped body or `nil` if the message has no body.
23
def self.wrap(message, **options)
24
if body = message.body
25
message.body = self.new(body, **options)
0 commit comments