Class: Hotfile::Record::BKS45
- Inherits:
-
Hotfile::Record
- Object
- Hotfile::Record
- Hotfile::Record::BKS45
- Defined in:
- lib/hotfile/record/BKS45.rb
Overview
Related Ticket/Document Information Record ! not tested, I hope this code works at all…
Instance Method Summary collapse
-
#initialize(line) ⇒ BKS45
constructor
A new instance of BKS45.
Constructor Details
#initialize(line) ⇒ BKS45
Returns a new instance of BKS45.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/hotfile/record/BKS45.rb', line 8 def initialize(line) super waiver, reason, identifier, date_of_issue, reserved = line.scan(/ (.{14}) (.{5}) ([\d ]{4}) ([\d ]{6}) (.{67}) /x).flatten @data = { waiver: waiver.strip, reason_code: reason.strip, identifier: identifier.strip, date_of_issue: Hotfile::Date.new(date_of_issue).to_date, reserved: reserved.strip } end |