class XmlConv::I2::Header
Constants
- TRANSACTION_TIME_FORMAT
Attributes
filename[RW]
prefix[RW]
recipient_id[RW]
suffix[R]
transaction_id[RW]
Public Class Methods
new(recipient_id = 'EPIN_PL')
click to toggle source
# File lib/xmlconv/i2/header.rb, line 11 def initialize(recipient_id = 'EPIN_PL') @recipient_id = recipient_id @prefix = @recipient_id time = Time.now # msec = sprintf('%03i', (time.to_f * 1000).to_i % 100) #@transaction_id = time.strftime("%Y%m%d%H%M#{msec}") @transaction_id = time.strftime(TRANSACTION_TIME_FORMAT) end
Public Instance Methods
suffix=(suffix)
click to toggle source
# File lib/xmlconv/i2/header.rb, line 19 def suffix=(suffix) @suffix = "_" << suffix.to_s end
to_s()
click to toggle source
# File lib/xmlconv/i2/header.rb, line 25 def to_s <<-EOS 001:#{@recipient_id} 002:ORDERX 003:220 010:#{filename} EOS end