class Capybara::Server::Middleware::Counter

def decrement(uri)

def decrement(uri)
  @mutex.synchronize { @value.delete_at(@value.index(uri) || - 1) }
end

def increment(uri)

def increment(uri)
  @mutex.synchronize { @value.push(uri) }
end

def initialize

def initialize
  @value = []
  @mutex = Mutex.new
end

def positive?

def positive?
  @mutex.synchronize { @value.length.positive? }
end

def value

def value
  @mutex.synchronize { @value.dup }
end