1
0
mirror of https://github.com/meineerde/rackstash.git synced 2026-02-23 20:01:44 +00:00

Document return value of BufferStack#flush_and_pop

This commit is contained in:
Holger Just 2017-02-07 23:59:40 +01:00
parent 1a43ed828b
commit eea88db9a8

View File

@ -50,6 +50,9 @@ module Rackstash
#
# If there was a buffer on the stack and it has pending data, it is flushed
# to the {#sink} before it is returned.
#
# @return [Buffer, nil] the popped and flushed {Buffer} or `nil` if there
# was no Buffer in the stack
def flush_and_pop
@stack.pop.tap do |buffer|
buffer.flush if buffer