Method: WebMock::Util::HashCounter#put

Defined in:
lib/webmock/util/hash_counter.rb

#put(key, num = 1) ⇒ Object



13
14
15
16
17
18
# File 'lib/webmock/util/hash_counter.rb', line 13

def put key, num=1
  @lock.synchronize do
    hash[key] = (hash[key] || 0) + num
    @order[key] = @max = @max + 1
  end
end