class StableMarriage::Preference
Attributes
object[R]
score[R]
Public Class Methods
new(object, score)
click to toggle source
# File lib/stable_marriage/preference.rb, line 5 def initialize(object, score) @object = object @score = score end
Public Instance Methods
==(other)
click to toggle source
# File lib/stable_marriage/preference.rb, line 14 def ==(other) return false unless other.is_a?(self.class) hash == other.hash end
Also aliased as: eql?
>(other)
click to toggle source
Items used in DescendingInsertionSortArray
must implement `>`
# File lib/stable_marriage/preference.rb, line 21 def >(other) score > other.score end
hash()
click to toggle source
# File lib/stable_marriage/preference.rb, line 10 def hash object.hash end