Class: Hotfile::Record::BKS46
- Inherits:
-
Hotfile::Record
- Object
- Hotfile::Record
- Hotfile::Record::BKS46
- Defined in:
- lib/hotfile/record/BKS46.rb
Overview
Qualifying Issue Information for Sales Transactions Record
Instance Method Summary collapse
-
#initialize(line) ⇒ BKS46
constructor
A new instance of BKS46.
Constructor Details
#initialize(line) ⇒ BKS46
Returns a new instance of BKS46.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/hotfile/record/BKS46.rb', line 7 def initialize(line) super original_doc_nr, original_location, original_date, original_agent_code, e_r, reserved = line.scan(/ (.{14}) ([A-Z ]{3}) ([A-Z0-9 ]{7}) ([\d ]{8}) (.{49}) (.{15}) /x).flatten @data = { original_issue: { doc_nr: original_doc_nr.strip, location: original_location.strip, date: Hotfile::Date.new(original_date).to_date, agent_code: original_agent_code.to_i }, endorsements_restrictions: e_r.strip, reserved: reserved.strip } end |