Class: Codec::Numstr

Inherits:
Base
  • Object
show all
Defined in:
lib/codec/fix.rb

Instance Attribute Summary

Attributes inherited from Base

#id

Instance Method Summary collapse

Methods inherited from Base

#add_subparser, #decode, #decode_with_length, #get_sub_parsers, #init_data, #initialize

Constructor Details

This class inherits a constructor from Codec::Base

Instance Method Details

#build_fieldObject



18
19
20
21
22
23
24
25
26
27
# File 'lib/codec/fix.rb', line 18

def build_field
  f = Field.new(@id)
    # Force conversion of ebcdic number to ascii number
    if IsEbcdic(@data)
 @data = Ebcdic2Ascii(@data)
    end
    
  f.set_value(@data.to_i)
  return f
end