Method: Containers::Heap#clear
- Defined in:
- lib/containers/heap.rb
#clear ⇒ Object
call-seq:
clear -> nil
Removes all elements from the heap, destructively.
Complexity: O(1)
135 136 137 138 139 140 |
# File 'lib/containers/heap.rb', line 135 def clear @next = nil @size = 0 @stored = {} nil end |