class IO::Event::PriorityHeap
def push(element)
Add a new element to the heap, then rearrange elements until the heap invariant is true again.
def push(element) # Insert the item at the end of the heap: @contents.push(element) # Bubble it up into position: bubble_up(@contents.size - 1) # validate! return self end