Sha256: e41ff6463e6e2bb22905ee7b0cbe9cb14bb8af54a051df9a8db1ba02dffb64d6

Contents?: true

Size: 426 Bytes

Versions: 1

Compression:

Stored size: 426 Bytes

Contents

require 'active_support/core_ext/object/blank'

class BankingData::GermanBank < BankingData::Bank
  include ActiveModel::Model

  attr_accessor :bic, :blz

  def self.all
    banks = []
    File.open(file).each_line do |line|
      blz = line[0..7]
      bic = line[139..149]
      banks << new(bic: bic, blz: blz)
    end
    banks
  end

  def self.file
    File.dirname(__FILE__) + '/../../data/BLZ_20130909.txt'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
banking_data-0.1.0 lib/banking_data/german_bank.rb