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:
parent
1a43ed828b
commit
eea88db9a8
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user