Method: Thrift::MemoryBufferTransport#reset_buffer

Defined in:
lib/thrift/transport/memory_buffer_transport.rb

#reset_buffer(new_buf = '') ⇒ Object

this method does not use the passed object directly but copies it



50
51
52
53
# File 'lib/thrift/transport/memory_buffer_transport.rb', line 50

def reset_buffer(new_buf = '')
  @buf.replace Bytes.force_binary_encoding(new_buf)
  @index = 0
end