Sha256: 92acff2cfa48cc337ce72acfa4b5e220fcea893f3f4c7487684070db06212191
Contents?: true
Size: 474 Bytes
Versions: 2
Compression:
Stored size: 474 Bytes
Contents
require 'active_support/core_ext/object/blank' class BankingData::GermanBank < BankingData::Bank include ActiveModel::Model attr_accessor :bic, :blz def self.all @@all ||= get_all end def self.get_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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
banking_data-0.3.0 | lib/banking_data/german_bank.rb |
banking_data-0.2.0 | lib/banking_data/german_bank.rb |