# File lib/em/buftok.rb, line 36 36: def initialize(delimiter = "\n", size_limit = nil) 37: # Store the specified delimiter 38: @delimiter = delimiter 39: 40: # Store the specified size limitation 41: @size_limit = size_limit 42: 43: # The input buffer is stored as an array. This is by far the most efficient 44: # approach given language constraints (in C a linked list would be a more 45: # appropriate data structure). Segments of input data are stored in a list 46: # which is only joined when a token is reached, substantially reducing the 47: # number of objects required for the operation. 48: @input = [] 49: 50: # Size of the input buffer 51: @input_size = 0 52: end