Class: BankingData::GermanBank
- Includes:
- ActiveModel::Model
- Defined in:
- lib/banking_data/german_bank.rb
Instance Attribute Summary collapse
-
#bic ⇒ Object
Returns the value of attribute bic.
-
#blz ⇒ Object
Returns the value of attribute blz.
Class Method Summary collapse
Methods inherited from Bank
Instance Attribute Details
#bic ⇒ Object
Returns the value of attribute bic.
6 7 8 |
# File 'lib/banking_data/german_bank.rb', line 6 def bic @bic end |
#blz ⇒ Object
Returns the value of attribute blz.
6 7 8 |
# File 'lib/banking_data/german_bank.rb', line 6 def blz @blz end |
Class Method Details
.all ⇒ Object
8 9 10 |
# File 'lib/banking_data/german_bank.rb', line 8 def self.all @@all ||= get_all end |
.file ⇒ Object
22 23 24 |
# File 'lib/banking_data/german_bank.rb', line 22 def self.file File.dirname(__FILE__) + '/../../data/BLZ_20130909.txt' end |
.get_all ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/banking_data/german_bank.rb', line 12 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 |