Method: Containers::PriorityQueue#next
- Defined in:
- lib/containers/priority_queue.rb
#next ⇒ Object
call-seq:
next -> object
Return the object with the next highest priority, but does not remove it
q = Containers::PriorityQueue.new
q.push("Alaska", 50)
q.push("Delaware", 30)
q.push("Georgia", 35)
q.next #=> "Alaska"
76 77 78 |
# File 'lib/containers/priority_queue.rb', line 76 def next @heap.next end |