class Priorityq::PriorityQueue::Element
Attributes
priority[R]
value[R]
Public Class Methods
new(priority, value)
click to toggle source
# File lib/priorityq/priority_queue.rb, line 8 def initialize(priority, value) @priority = priority @value = value end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/priorityq/priority_queue.rb, line 13 def <=>(other) priority <=> other.priority end