Class: MT940::Account
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::LINE, Field::SHORT_DATE
Instance Attribute Summary collapse
-
#account_currency ⇒ Object
readonly
Returns the value of attribute account_currency.
-
#account_number ⇒ Object
readonly
Returns the value of attribute account_number.
-
#bank_code ⇒ Object
readonly
Returns the value of attribute bank_code.
Attributes inherited from Field
Instance Method Summary collapse
Methods inherited from Field
Constructor Details
This class inherits a constructor from MT940::Field
Instance Attribute Details
#account_currency ⇒ Object (readonly)
Returns the value of attribute account_currency.
114 115 116 |
# File 'lib/mt940.rb', line 114 def account_currency @account_currency end |
#account_number ⇒ Object (readonly)
Returns the value of attribute account_number.
114 115 116 |
# File 'lib/mt940.rb', line 114 def account_number @account_number end |
#bank_code ⇒ Object (readonly)
Returns the value of attribute bank_code.
114 115 116 |
# File 'lib/mt940.rb', line 114 def bank_code @bank_code end |
Instance Method Details
#parse_content(content) ⇒ Object
118 119 120 121 |
# File 'lib/mt940.rb', line 118 def parse_content(content) content.match(CONTENT) @bank_code, @account_number, @account_currency = $1, $2, $3 end |