poker-ranking 1.0.4 → 1.0.5

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 -1
  2. data/lib/poker_ranking.rb +1 -1
  3. metadata +1 -1
data/lib/card.rb CHANGED
@@ -3,6 +3,7 @@ module PokerRanking
3
3
  class PokerRanking::Card
4
4
 
5
5
  RANKS = %w(2 3 4 5 6 7 8 9 10 Jack Queen King Ace)
6
+ SHORT_RANKS = %w(2 3 4 5 6 7 8 9 10 J Q K A)
6
7
  SUITS = %w(Hearts Diamonds Spades Clubs)
7
8
 
8
9
  def initialize(card_data)
@@ -24,7 +25,7 @@ module PokerRanking
24
25
  end
25
26
 
26
27
  def data
27
- { rank: @rank, suit: @suit }
28
+ { rank: SHORT_RANKS[@value - 2], suit: @suit.downcase }
28
29
  end
29
30
 
30
31
  def ==(other_card)
data/lib/poker_ranking.rb CHANGED
@@ -2,5 +2,5 @@ require_relative 'hand'
2
2
  require_relative 'card'
3
3
 
4
4
  module PokerRanking
5
- VERSION = '1.0.4'
5
+ VERSION = '1.0.5'
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.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: