Class: MT940::Account

Inherits:
Field
  • Object
show all
Defined in:
lib/mt940.rb

Overview

25 - Legacy This class is deprecated as it does not match the spec.

Constant Summary collapse

CONTENT =
/^(.{8,11})\/(\d{0,23})([A-Z]{3})?$/

Constants inherited from Field

Field::DATE, Field::SHORT_DATE

Instance Attribute Summary collapse

Attributes inherited from Field

#content, #modifier

Instance Method Summary collapse

Methods inherited from Field

for, #initialize

Constructor Details

This class inherits a constructor from MT940::Field

Instance Attribute Details

#account_currencyObject (readonly)

Returns the value of attribute account_currency.



110
111
112
# File 'lib/mt940.rb', line 110

def 
  @account_currency
end

#account_numberObject (readonly)

Returns the value of attribute account_number.



110
111
112
# File 'lib/mt940.rb', line 110

def 
  @account_number
end

#bank_codeObject (readonly)

Returns the value of attribute bank_code.



110
111
112
# File 'lib/mt940.rb', line 110

def bank_code
  @bank_code
end

Instance Method Details

#parse_content(content) ⇒ Object



114
115
116
117
# File 'lib/mt940.rb', line 114

def parse_content(content)
  content.match(CONTENT)
  @bank_code, @account_number, @account_currency = $1, $2, $3
end