Sha256: 5c712e6346885501e7eb56a56df486132754a85361136c84bddce1ceeb48d556

Contents?: true

Size: 445 Bytes

Versions: 1

Compression:

Stored size: 445 Bytes

Contents

class MT940::Ing < MT940::Base

  private

  def parse_line_before_sepa
    pattern = Regexp.new "(#{MT940::BBAN_PATTERN})(.+)"
    if @line.match(pattern)
      @description    = $2.strip
      @contra_account = $1[/[^0+]\d*/]
    end
  end

  def parse_line_after_sepa
    if @line.match(MT940::SEPA_PATTERN)
      @contra_account = $1
      @description    = $4.strip
    end
  end

  def sepa?
    @line.match(MT940::SEPA_PATTERN)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mt940-0.8.0 lib/mt940/banks/ing.rb