class EulerPoker::FullHouse
Public Instance Methods
instance_comparison(other)
click to toggle source
# File lib/euler_poker/hands/full_house.rb, line 5 def instance_comparison(other) if triplet_rank == other.triplet_rank return pair_rank <=> other.pair_rank else return triplet_rank <=> other.triplet_rank end end
pair_rank()
click to toggle source
# File lib/euler_poker/hands/full_house.rb, line 19 def pair_rank rank_counts .find { |rank, count| count == 2 } .first end
triplet_rank()
click to toggle source
# File lib/euler_poker/hands/full_house.rb, line 13 def triplet_rank rank_counts .find { |rank, count| count == 3 } .first end
valid?()
click to toggle source
# File lib/euler_poker/hands/full_house.rb, line 25 def valid? full_house? end