Skip to content
This repository
Browse code

De-dupe logic.

  • Loading branch information...
commit b20e3182530157621729d06fe58e83cfe3840df6 1 parent 3ac94b2
Gabe Berke-Williams authored

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  lib/fake_braintree/credit_card.rb
6  lib/fake_braintree/credit_card.rb
@@ -31,12 +31,10 @@ def response_for_updated_card(credit_card)
31 31
     end
32 32
 
33 33
     def credit_card_exists_in_registry?
34  
-      token = credit_card['token']
35 34
       FakeBraintree.registry.credit_cards.key?(token)
36 35
     end
37 36
 
38 37
     def credit_card_from_registry
39  
-      token = credit_card['token']
40 38
       FakeBraintree.registry.credit_cards[token]
41 39
     end
42 40
 
@@ -71,5 +69,9 @@ def set_expiration_month_and_year
71 69
         @credit_card["expiration_year"] = expiration_year
72 70
       end
73 71
     end
  72
+
  73
+    def token
  74
+      credit_card['token']
  75
+    end
74 76
   end
75 77
 end

0 notes on commit b20e318

Please sign in to comment.
Something went wrong with that request. Please try again.