credit_debit_card_number_validator 16.09.4 → 16.09.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/validator.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e280c8967355fa643feca760af936aa5ecc35f29
|
4
|
+
data.tar.gz: 30f078a98969acb38bd0a1956595fd6c310f59a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 578ad5878aea0aa35b232ef2849c294ea938d83a81f0a1dfa602b08004e0eb90c099638b7db7ab0cfee9a4fcb47d4f9856e13e3ae18b65198535cbc12c1b1915
|
7
|
+
data.tar.gz: 48bb15d8fab33a80eac0c35e76de2a56b604723d427c830753863ebbc4904af69e408f43be02f4bae6512beb9dfeb7a4d8843dd939f05cac3694be105f9837b2
|
data/lib/validator.rb
CHANGED
@@ -18,7 +18,7 @@ module CreditDebitCardNumberValidator
|
|
18
18
|
raise ArgumentError, "no card number specified" if card_number.to_i == 0
|
19
19
|
end
|
20
20
|
|
21
|
-
# class method >
|
21
|
+
# class method > all_information_about
|
22
22
|
# get every information about card number and
|
23
23
|
# return them in object of type Information class
|
24
24
|
# return example: #<CreditDebitCardNumberValidator::Information:0x2eb4b90 @card_number="4929334156772439", @is_valid=true, @mod_10_result=0, @iin=4, @brand="Visa", @check_digit="9", @length=16>
|
@@ -244,7 +244,7 @@ module CreditDebitCardNumberValidator
|
|
244
244
|
# check card_number variable
|
245
245
|
check card_number
|
246
246
|
|
247
|
-
(
|
247
|
+
(determine_iin_and_brand card_number)[0]
|
248
248
|
end
|
249
249
|
|
250
250
|
# class method > determine_brand
|