class Rank::ThreeOfAKind
Constants
- SCORE
Public Instance Methods
<=>(hand)
click to toggle source
# File lib/rank/three_of_a_kind.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