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.
Completed
Push — master ( 24adef...7b60c7 )
by Leonardo
01:22
created

Configuration   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 23
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A country_validators() 0 3 1
A add() 0 3 1
A static_bics() 0 7 1
A static_bics? 0 3 1
1
# frozen_string_literal: true
2
3
module IbanBic
4
  class Configuration
5
    attr_accessor :iban_meta_path, :use_static_bics, :static_bics_path, :bics_table_name
6
7
    def country_validators
8
      @country_validators ||= {}
9
    end
10
11
    def add(country)
12
      country_validators[country] = Proc.new
13
    end
14
15
    def static_bics
16
      @static_bics ||= begin
17
        Hash[Dir.glob(File.join(static_bics_path, "*.yml")).map do |file|
18
          [File.basename(file).delete(".yml").upcase, YAML.load_file(file)]
19
        end].freeze
20
      end
21
    end
22
23
    def static_bics?
24
      use_static_bics
25
    end
26
  end
27
end
28