Class: Guevara::BatchHeader
Instance Attribute Summary
Attributes inherited from Row
Instance Method Summary collapse
Methods inherited from Row
Constructor Details
This class inherits a constructor from Guevara::Row
Instance Method Details
#default_attributes ⇒ Object
7 8 9 10 11 |
# File 'lib/guevara/batch_header.rb', line 7 def default_attributes { discretionary_data: '' } end |
#fields ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/guevara/batch_header.rb', line 20 def fields ["5", "%<service_class>3d", "%<company_name>-16.16s", "%<discretionary_data>-20.20s", "%<company_id>10.10s", "PPD", "%<entry_description>10.10s", "%<company_date>s", "%<effective_date>s", " 1", "%<origin_id>8d", "%<number>07d"] end |
#format_attributes ⇒ Object
13 14 15 16 17 18 |
# File 'lib/guevara/batch_header.rb', line 13 def format_attributes attributes[:company_date] = Date.parse(attributes[:company_date]). strftime('%y%m%d') attributes[:effective_date] = Date.parse(attributes[:effective_date]). strftime('%y%m%d') end |