From eea88db9a8b0d6c968116a75e6f449adf849c809 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Tue, 7 Feb 2017 23:59:40 +0100 Subject: [PATCH] Document return value of BufferStack#flush_and_pop --- lib/rackstash/buffer_stack.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/rackstash/buffer_stack.rb b/lib/rackstash/buffer_stack.rb index b4d302f..5037389 100644 --- a/lib/rackstash/buffer_stack.rb +++ b/lib/rackstash/buffer_stack.rb @@ -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