class Rank::FullHouse

Constants

SCORE

Public Instance Methods

<=>(hand) click to toggle source
# File lib/rank/full_house.rb, line 6
def <=>(hand)
  first_value = @hand.only_values.detect { |hd| @hand.only_values.count(hd) == 3}
  second_value = hand.only_values.detect { |hd| hand.only_values.count(hd) == 3}
  first_value <=> second_value
end