Method: Algorithms::Containers::Stack#size
- Defined in:
- lib/containers/stack.rb
#size ⇒ Object
Return the number of items in the stack.
s = Algorithms::Containers::Stack.new([1, 2, 3])
s.size #=> 3
55 56 57 |
# File 'lib/containers/stack.rb', line 55 def size @container.size end |