GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Setup Failed
Push — master ( 7b60c7...2cddf6 )
by Leonardo
52s
created

Configuration.static_bics_path=()   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
# frozen_string_literal: true
2
3
module IbanBic
4
  class Configuration
5
    attr_accessor :iban_meta_path, :use_static_bics, :bics_table_name
6
    attr_reader :static_bics_path
7
8
    def country_validators
9
      @country_validators ||= {}
10
    end
11
12
    def add(country)
13
      country_validators[country] = Proc.new
14
    end
15
16
    def static_bics_path=(value)
17
      @static_bics_path = value
18
      @static_bics = nil
19
    end
20
21
    def static_bics
22
      @static_bics ||= begin
23
        Hash[Dir.glob(File.join(static_bics_path, "*.yml")).map do |file|
24
          [File.basename(file).delete(".yml").upcase, YAML.load_file(file)]
25
        end].freeze
26
      end
27
    end
28
29
    def static_bics?
30
      use_static_bics
31
    end
32
  end
33
end
34