bank-contact 0.0.2 → 0.0.3
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.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/lib/bank/validators/bic_validator.rb +1 -1
- data/lib/bank/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46df80b38f6f621b31a14a7ed8cfe460ade843e0
|
4
|
+
data.tar.gz: f3e6c859145f100f55ff7dd6565ab07a8f09f971
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 431f5bbc45834326b324e2a0962fe36c1b7dab4e6bd644f482528ed2fe09ff4151f411a71e45e4c9b90830f70e748be45bac9f7426e6fe6ba9420eefd20aa705
|
7
|
+
data.tar.gz: 452e058897038eb9cac4a3c6ab7172ab64b6b674c95c2893fbdaa218f1418bacf8a2425fd1cda977cae402d8a4371daf0629ba13ede536a731c0abdfe201d0db
|
data/README.md
CHANGED
@@ -21,15 +21,16 @@ Or install it yourself as:
|
|
21
21
|
|
22
22
|
## Usage
|
23
23
|
|
24
|
-
### Bank
|
24
|
+
### Bank::IBAN
|
25
25
|
|
26
26
|
require 'bank/iban'
|
27
27
|
|
28
|
-
iban = IBAN.new("DE89 3704 0044 0532 0130 00")
|
28
|
+
iban = Bank::IBAN.new("DE89 3704 0044 0532 0130 00")
|
29
29
|
|
30
30
|
iban.country_code # "DE"
|
31
31
|
iban.check_digits # "89"
|
32
|
-
iban.bban #
|
32
|
+
iban.bban # <Bank::BBAN...>
|
33
|
+
iban.bban.to_s # "370400440532013000"
|
33
34
|
iban.account_number # "0532013000"
|
34
35
|
iban.bank_identifier # "37040044"
|
35
36
|
|
@@ -42,7 +43,7 @@ Or install it yourself as:
|
|
42
43
|
|
43
44
|
# or
|
44
45
|
|
45
|
-
IBAN.valid? "DE89 3704 0044 0532 0130 00" # true
|
46
|
+
Bank::IBAN.valid? "DE89 3704 0044 0532 0130 00" # true
|
46
47
|
|
47
48
|
or as ActiveModel Validator (make sure you have 'active_model' in your Gemfile)
|
48
49
|
|
@@ -2,6 +2,6 @@ require 'active_model/validator'
|
|
2
2
|
|
3
3
|
class BicValidator < ActiveModel::EachValidator
|
4
4
|
def validate_each(record, attribute, value)
|
5
|
-
record.errors.add(attribute, :invalid) unless BIC.valid?(value)
|
5
|
+
record.errors.add(attribute, :invalid) unless Bank::BIC.valid?(value)
|
6
6
|
end
|
7
7
|
end
|
data/lib/bank/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bank-contact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -122,3 +122,4 @@ test_files:
|
|
122
122
|
- spec/contact_spec.rb
|
123
123
|
- spec/iban_spec.rb
|
124
124
|
- spec/spec_helper.rb
|
125
|
+
has_rdoc:
|