class MT940::StatementLine
61
Constants
- CONTENT
Attributes
Public Instance Methods
Source
# File lib/mt940.rb, line 190 def parse_content(content) content.match(CONTENT) raw_date = ::Regexp.last_match(1) raw_entry_date = ::Regexp.last_match(2) @funds_code = case ::Regexp.last_match(3) when 'C' :credit when 'D' :debit when 'RC' :return_credit when 'RD' :return_debit end @amount = parse_amount_in_cents(::Regexp.last_match(4)) @swift_code = ::Regexp.last_match(5) @reference = ::Regexp.last_match(6) @transaction_description = ::Regexp.last_match(7) @date = parse_date(raw_date) @entry_date = parse_entry_date(raw_entry_date, @date) if raw_entry_date end