class MT940::Rabobank
Private Instance Methods
determine_description_after_sepa()
click to toggle source
# File lib/mt940/banks/rabobank.rb, line 43 def determine_description_after_sepa hash = hashify_description(@line) @description = '' @description += hash['NAME'] if hash['NAME'] @description += ' ' @description += hash['REMI'] if hash['REMI'] end
determine_description_before_sepa()
click to toggle source
# File lib/mt940/banks/rabobank.rb, line 35 def determine_description_before_sepa if @description.nil? @description = @line else @description += ' ' + @line end end
parse_tag_25()
click to toggle source
# File lib/mt940/banks/rabobank.rb, line 5 def parse_tag_25 @line.gsub!('.','') if @line.match(Regexp.new ":25:(#{MT940::IBAN_PATTERN})") @bank_account = $1 @sepa = true else @bank_account = $1.gsub(/^0/,'') if @line.match(/^:\d{2}:[^\d]*(\d*)/) end end
parse_tag_61()
click to toggle source
Calls superclass method
MT940::Base#parse_tag_61
# File lib/mt940/banks/rabobank.rb, line 15 def parse_tag_61 match = super(/^:61:(\d{6})(C|D)(\d+),(\d{0,2})\w{4}\w{1}(\d{9}|NONREF|EREF)(.*)$/) if match if @sepa @transaction.contra_account = match[6].strip else @transaction.contra_account = match[5].strip @transaction.contra_account_owner = match[6].strip end end end
parse_tag_86()
click to toggle source
# File lib/mt940/banks/rabobank.rb, line 27 def parse_tag_86 if @line.match(/^:86:(.*)$/) @line = $1.strip @sepa ? determine_description_after_sepa : determine_description_before_sepa @transaction.description = @description.strip end end