poker-ranking 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/card.rb +2 -2
  2. data/lib/poker_ranking.rb +1 -1
  3. metadata +1 -1
@@ -7,13 +7,13 @@ module PokerRanking
7
7
  SUITS = %w(Hearts Diamonds Spades Clubs)
8
8
 
9
9
  def initialize(card_data)
10
- @suit = card_data.has_key?(:suit) ? card_data[:suit] : card_data['suit']
10
+ @suit = (card_data.has_key?(:suit) ? card_data[:suit] : card_data['suit']).capitalize
11
11
  @rank = card_data.has_key?(:rank) ? card_data[:rank].to_s : card_data['rank'].to_s
12
12
  set_value_by_rank_name(@rank)
13
13
  end
14
14
 
15
15
  def set_value_by_rank_name(rank)
16
- @value = RANKS.index(rank) + 2
16
+ @value = RANKS.index(rank.capitalize) + 2
17
17
  end
18
18
 
19
19
  def worth_less_than(other_hand)
@@ -2,5 +2,5 @@ require_relative 'hand'
2
2
  require_relative 'card'
3
3
 
4
4
  module PokerRanking
5
- VERSION = '1.0.6'
5
+ VERSION = '1.0.7'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poker-ranking
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: