Method: PQueue#each_pop
- Defined in:
- lib/pqueue.rb
#each_pop ⇒ Object
Iterate over the ordered elements, destructively.
221 222 223 224 225 226 |
# File 'lib/pqueue.rb', line 221 def each_pop #:yields: popped until empty? yield pop end nil end |