Class: MT940::Statement
Overview
28
Constant Summary collapse
- CONTENT =
/^(0|(\d{5,5})\/(\d{2,5}))$/
Constants inherited from Field
Field::DATE, Field::SHORT_DATE
Instance Attribute Summary collapse
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#sheet ⇒ Object
readonly
Returns the value of attribute sheet.
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
#number ⇒ Object (readonly)
Returns the value of attribute number.
96 97 98 |
# File 'lib/mt940.rb', line 96 def number @number end |
#sheet ⇒ Object (readonly)
Returns the value of attribute sheet.
96 97 98 |
# File 'lib/mt940.rb', line 96 def sheet @sheet end |
Instance Method Details
#parse_content(content) ⇒ Object
100 101 102 103 104 105 106 107 |
# File 'lib/mt940.rb', line 100 def parse_content(content) content.match(CONTENT) if $1 == '0' @number = @sheet = 0 else @number, @sheet = $2.to_i, $3.to_i end end |