def increment!(amount = 1, time: Time.now)
      exception = nil
      exceeded_index = limits.find_index do |limit|
        begin
          limit.increment!(amount, time: time)
        rescue TrafficJam::LimitExceededError => e
          exception = e
          true
        end
      end
      if exceeded_index
        limits[0...exceeded_index].each do |limit|
          limit.decrement(amount, time: time)
        end
        raise exception
      end
    end
def increment!(amount = 1, time: Time.now)
      exception = nil
      exceeded_index = limits.find_index do |limit|
        begin
          limit.increment!(amount, time: time)
        rescue TrafficJam::LimitExceededError => e
          exception = e
          true
        end
      end
      if exceeded_index
        limits[0...exceeded_index].each do |limit|
          limit.decrement(amount, time: time)
        end
        raise exception
      end
    end
Increment the limits by the given amount. Raises an error and does not
 increment if doing so would exceed any limit.

 @param amount [Integer] amount to increment by
 @param time [Time] optional time of increment
 @return [nil]
 @raise [TrafficJam::LimitExceededError] if increment would exceed any
   limits