Method: Codec::Numbin#encode

Defined in:
lib/codec/fix.rb

#encode(buf, field) ⇒ Object



41
42
43
44
45
46
# File 'lib/codec/fix.rb', line 41

def encode(buf, field)
  val = field.get_value.to_i
  out = Numbin.numbin(val,@length)
  buf << out
  return out.length
end