deck-of-cards 0.0.5 → 0.0.6
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.
- data/lib/deck-of-cards/card.rb +4 -4
- data/lib/deck-of-cards/version.rb +1 -1
- metadata +1 -1
data/lib/deck-of-cards/card.rb
CHANGED
@@ -12,7 +12,7 @@ class Card
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def value
|
15
|
-
case rank
|
15
|
+
case @rank
|
16
16
|
when 'Ace'
|
17
17
|
14
|
18
18
|
when 'King'
|
@@ -22,15 +22,15 @@ class Card
|
|
22
22
|
when 'Jack'
|
23
23
|
11
|
24
24
|
else
|
25
|
-
rank
|
25
|
+
@rank
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
29
|
def to_s
|
30
|
-
"#{rank} of #{suit}"
|
30
|
+
"#{@rank} of #{@suit}"
|
31
31
|
end
|
32
32
|
|
33
33
|
def inspect
|
34
|
-
"<#{rank} of #{suit}>"
|
34
|
+
"<#{@rank} of #{@suit}>"
|
35
35
|
end
|
36
36
|
end
|