class BSB::BankListGenerator

Public Class Methods

load_file(filename) click to toggle source
# File lib/bsb/bank_list_generator.rb, line 8
def self.load_file(filename)
  hash = {}
  CSV.foreach(filename) do |row|
    row[2].split(', ').each do |prefix|
      prefix = prefix.chomp.rjust(2, '0')
      hash[prefix] = row[1]
    end
  end
  new(hash)
end