class Rank::FourOfAKind

Constants

SCORE

Public Instance Methods

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