Permalink
Browse files

Move higher-level method up in the file.

  • Loading branch information...
1 parent 7bd4e20 commit 94cca243601badd8846509efe300614727293787 @gabebw gabebw committed Jan 13, 2012
Showing with 16 additions and 16 deletions.
  1. +16 −16 lib/fake_braintree/customer.rb
View
32 lib/fake_braintree/customer.rb
@@ -99,22 +99,6 @@ def add_credit_card_to_registry(new_credit_card_hash)
FakeBraintree.registry.credit_cards[token] = new_credit_card_hash
end
- def credit_card_expiration_month
- credit_card_expiration_date[0]
- end
-
- def credit_card_expiration_year
- credit_card_expiration_date[1]
- end
-
- def credit_card_expiration_date
- if credit_card_hash.key?("expiration_date")
- credit_card_hash["expiration_date"].split('/')
- else
- []
- end
- end
-
def generate_credit_card_hash_from(new_credit_card_hash)
if new_credit_card_hash.present? && new_credit_card_hash.is_a?(Hash)
new_credit_card_hash["last_4"] = new_credit_card_hash["number"][-4..-1]
@@ -134,6 +118,22 @@ def generate_credit_card_hash_from(new_credit_card_hash)
end
end
+ def credit_card_expiration_month
+ credit_card_expiration_date[0]
+ end
+
+ def credit_card_expiration_year
+ credit_card_expiration_date[1]
+ end
+
+ def credit_card_expiration_date
+ if credit_card_hash.key?("expiration_date")
+ credit_card_hash["expiration_date"].split('/')
+ else
+ []
+ end
+ end
+
def delete_customer_with_id(id)
FakeBraintree.registry.customers[id] = nil
end

0 comments on commit 94cca24

Please sign in to comment.