class Rx::PriorityQueue::IndexedItem

Attributes

id[R]
value[R]

Public Class Methods

new(value) click to toggle source
# File lib/rx/internal/priority_queue.rb, line 107
def initialize(value)
  @id = @@length += 1
  @value = value
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/rx/internal/priority_queue.rb, line 112
def <=>(other)
  if @value == other.value
    @id <=> other.id
  else
    @value <=> other.value
  end
end