Method: Codec::String#encode

Defined in:
lib/codec/fix.rb

#encode(f) ⇒ Object



63
64
65
66
67
68
69
70
# File 'lib/codec/fix.rb', line 63

def encode(f)
  out = f.get_value
  if @length >  0
    raise TooLongDataException if out.length > @length
    out = out.ljust(@length," ")
  end
  return out
end