class Utils::Grepper::Queue

def push(x)

Returns:
  • (Queue) - returns self to allow for method chaining

Parameters:
  • x (Object) -- the element to be added to the queue
def push(x)
  @data.shift if @data.size > @max_size
  @data << x
  self
end