Method: Codec::Numasc#encode
- Defined in:
- lib/codec/fix.rb
#encode(field) ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'lib/codec/fix.rb', line 46 def encode(field) out = field.get_value.to_s if @length > 0 out = out.rjust(@length,"0") raise TooLongDataException if out.length > @length end return out end |