deck-of-cards 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,11 @@
1
- Card = Struct.new :rank, :suit do
1
+ class Card
2
2
  include Comparable
3
+
4
+ attr_reader :rank, :suit
5
+
6
+ def initialize rank, suit
7
+ @rank, @suit = rank, suit
8
+ end
3
9
 
4
10
  def <=> other_card
5
11
  self.value <=> other_card.value
@@ -23,4 +29,8 @@ Card = Struct.new :rank, :suit do
23
29
  def to_s
24
30
  "#{rank} of #{suit}"
25
31
  end
32
+
33
+ def inspect
34
+ "<#{rank} of #{suit}>"
35
+ end
26
36
  end
@@ -1,3 +1,3 @@
1
1
  class DeckOfCards
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deck-of-cards
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: