Class: Hotfile::Record::BFT99
- Inherits:
-
Hotfile::Record
- Object
- Hotfile::Record
- Hotfile::Record::BFT99
- Defined in:
- lib/hotfile/record/BFT99.rb
Overview
File Totals per Currency Type Record
Instance Method Summary collapse
-
#initialize(line) ⇒ BFT99
constructor
A new instance of BFT99.
Constructor Details
#initialize(line) ⇒ BFT99
Returns a new instance of BFT99.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/hotfile/record/BFT99.rb', line 7 def initialize(line) super bsp_id, office_count, gross, remittance, commission, tax, commission_tax, reserved, currency = line.scan(/ ([A-Z0-9 ]{3}) (\d{5}) (\d{14}.) (\d{14}.) (\d{14}.) (\d{14}.) (\d{14}.) (.{36}) ([A-Z0-9]{4}) /x).flatten @data = { currency: currency.strip, bsp_id: bsp_id.strip, office_count: Hotfile::Integer.new(office_count).to_i, gross: Hotfile::Integer.new(gross).to_i, remittance: Hotfile::Integer.new(remittance).to_i, commission: Hotfile::Integer.new(commission).to_i, tax: Hotfile::Integer.new(tax).to_i, commission_tax: Hotfile::Integer.new(commission_tax).to_i, reserved: reserved.strip } end |