class Google::Cloud::Firestore::Watch::EnumeratorQueue
@private
Public Class Methods
new(sentinel = nil)
click to toggle source
# File lib/google/cloud/firestore/watch/enumerator_queue.rb, line 23 def initialize sentinel = nil @queue = Queue.new @sentinel = sentinel end
Public Instance Methods
each() { |obj| ... }
click to toggle source
# File lib/google/cloud/firestore/watch/enumerator_queue.rb, line 32 def each return enum_for :each unless block_given? loop do obj = @queue.pop break if obj.equal? @sentinel yield obj end end
push(obj)
click to toggle source
# File lib/google/cloud/firestore/watch/enumerator_queue.rb, line 28 def push obj @queue.push obj end