Method: Pry::Ring#initialize

Defined in:
lib/pry/ring.rb

#initialize(max_size) ⇒ Ring

Returns a new instance of Ring.

Parameters:

  • Maximum buffer size. The buffer will start overwriting elements once its reaches its maximum capacity

Since:

  • v0.12.0

API:

  • public



33
34
35
36
37
# File 'lib/pry/ring.rb', line 33

def initialize(max_size)
  @max_size = max_size
  @mutex = Mutex.new
  clear
end