Class: BankingData::AustrianBank
- Includes:
- ActiveModel::Model
- Defined in:
- lib/banking_data/austrian_bank.rb
Instance Attribute Summary collapse
-
#bic ⇒ Object
Returns the value of attribute bic.
Class Method Summary collapse
Methods inherited from Bank
Instance Attribute Details
#bic ⇒ Object
Returns the value of attribute bic.
7 8 9 |
# File 'lib/banking_data/austrian_bank.rb', line 7 def bic @bic end |
Class Method Details
.all ⇒ Object
9 10 11 |
# File 'lib/banking_data/austrian_bank.rb', line 9 def self.all @@all ||= get_all end |
.file ⇒ Object
22 23 24 25 |
# File 'lib/banking_data/austrian_bank.rb', line 22 def self.file File.dirname(__FILE__) + '/../../data/kiverzeichnis_gesamt_de_1381499802577.csv' end |
.get_all ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/banking_data/austrian_bank.rb', line 13 def self.get_all banks = [] SmarterCSV.process(file, opts).each do |line| bic = line[:'swift-code'].try(:gsub, /"/, '') banks << new(bic: bic) end banks end |
.opts ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/banking_data/austrian_bank.rb', line 27 def self.opts { col_sep: ';', file_encoding: 'iso-8859-1', force_simple_split: true } end |