Sha256: 08b8d6013097feca7e51a95c6462702e170bf58f506bb2eec8a201724bb4cfcd
Contents?: true
Size: 301 Bytes
Versions: 1
Compression:
Stored size: 301 Bytes
Contents
module MT940Structured::Parsers module IbanSupport IBAN_R = /[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{0,30}/ def iban?(string) !string.nil? and string.match(IBAN_R) end def iban_to_account(iban) !iban.nil? ? iban.split(//).last(10).join.gsub(/^0+/, '') : nil end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
zilverline-mt940-2.0 | lib/mt940_structured/parsers/iban_support.rb |