Method: Containers::Queue#next

Defined in:
lib/containers/queue.rb

#nextObject

Returns the next item from the queue but does not remove it.

q = Containers::Queue.new([1, 2, 3])
q.next #=> 1
q.size #=> 3


26
27
28
# File 'lib/containers/queue.rb', line 26

def next
  @container.front
end