Method: Containers::Stack#next

Defined in:
lib/containers/stack.rb

#nextObject

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

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


25
26
27
# File 'lib/containers/stack.rb', line 25

def next
  @container.back
end