bs2_api 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/bs2_api/util/bank_service.rb +4 -3
- data/lib/bs2_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b3224179dc0824ec6bd97ad39ea0069086ed63c83438add32914a6f5336b8e4
|
4
|
+
data.tar.gz: 543ed7441a126e649ba442b1ff3144bfa6967fc8136ab58ccc6775537e1477fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76d95274953486d82a83b863bd37f5a7dc47b86a35732ade87b3e2c27bd79a330d10ae7b6cc2895665cf4b96ff1cfa05910bc94d7b84d84ec6576192c08b39e1
|
7
|
+
data.tar.gz: 6f5013bf0e2b1f9f3bf771f74cf4d4265d78627ccc0c934301a29e8e6f2fe5d4898300acb0211f99037a97eff26110ee943d2ddfe70fad6bb8ff3addd40a94cc
|
data/Gemfile.lock
CHANGED
@@ -7,13 +7,14 @@ module Bs2Api
|
|
7
7
|
class BankService
|
8
8
|
class << self
|
9
9
|
def find_by_code code
|
10
|
-
|
11
|
-
|
10
|
+
code = code.to_s.strip
|
11
|
+
bank = bank_list.find {|b| b["code"] == code }
|
12
|
+
raise Bs2Api::Errors::MissingBank, "Bank with code '#{code}' not registered into util/banks.yml file" if bank.blank?
|
12
13
|
bank
|
13
14
|
end
|
14
15
|
|
15
16
|
def bank_list
|
16
|
-
|
17
|
+
YAML.load_file(File.join(__dir__, 'banks.yml'))
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
data/lib/bs2_api/version.rb
CHANGED