Method: Codec::String#encode
- Defined in:
- lib/codec/fix.rb
#encode(buf, f) ⇒ Object
143 144 145 146 147 148 149 150 151 |
# File 'lib/codec/fix.rb', line 143 def encode(buf, f) out = f.get_value if @length > 0 raise TooLongDataException if out.length > @length out = out.ljust(@length," ") end buf << out return out.length end |