Class: UnionBank::ECrediting::Common::HeaderLine
- Inherits:
-
Object
- Object
- UnionBank::ECrediting::Common::HeaderLine
- Includes:
- ActiveModel::Model
- Defined in:
- lib/union_bank/e_crediting/common/header_line.rb
Overview
Describes UnionBank eCrediting generic file header line
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#org_short_code ⇒ Object
Returns the value of attribute org_short_code.
-
#total_no_of_refs ⇒ Object
Returns the value of attribute total_no_of_refs.
Instance Method Summary collapse
-
#initialize(org_short_code:, date:, total_no_of_refs: 0) ⇒ HeaderLine
constructor
A new instance of HeaderLine.
- #ordered_field_values ⇒ Array
Constructor Details
#initialize(org_short_code:, date:, total_no_of_refs: 0) ⇒ HeaderLine
Returns a new instance of HeaderLine.
21 22 23 24 25 26 27 |
# File 'lib/union_bank/e_crediting/common/header_line.rb', line 21 def initialize(org_short_code:, date:, total_no_of_refs: 0) @org_short_code = org_short_code @date = date @total_no_of_refs = total_no_of_refs raise ArgumentError, errors..to_sentence unless valid? end |
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
10 11 12 |
# File 'lib/union_bank/e_crediting/common/header_line.rb', line 10 def date @date end |
#org_short_code ⇒ Object
Returns the value of attribute org_short_code.
10 11 12 |
# File 'lib/union_bank/e_crediting/common/header_line.rb', line 10 def org_short_code @org_short_code end |
#total_no_of_refs ⇒ Object
Returns the value of attribute total_no_of_refs.
10 11 12 |
# File 'lib/union_bank/e_crediting/common/header_line.rb', line 10 def total_no_of_refs @total_no_of_refs end |
Instance Method Details
#ordered_field_values ⇒ Array
30 31 32 33 34 35 36 37 |
# File 'lib/union_bank/e_crediting/common/header_line.rb', line 30 def ordered_field_values [ "H", # identifier org_short_code.strip, date.strftime("%m%d%Y"), total_no_of_refs ] end |