Skip to content

Commit f16adc3

Browse files
Add missing documentation.
1 parent 4e2e6ea commit f16adc3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/protocol/grpc/body/readable_body.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ module Body
1515
# This is the standard readable body for gRPC - all gRPC responses use message framing.
1616
# Wraps the underlying HTTP body and transforms raw chunks into decoded gRPC messages.
1717
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.
1823
def self.wrap(message, **options)
1924
if body = message.body
2025
message.body = self.new(body, **options)

0 commit comments

Comments
 (0)